Disclosure of Invention
The invention mainly aims to provide a multilingual message push test method, a multilingual message push test device, multilingual message push test equipment and a storage medium, and aims to solve the technical problem of how to perform multilingual and high-efficiency test on message push tests to application programs in the prior art.
In order to achieve the above object, the present invention provides a multilingual message push test method, which comprises the following steps:
when a push event triggered by an equipment interface of intelligent equipment in an access application program is received, determining a push channel for pushing a message to be pushed corresponding to the push event;
pushing the message to be pushed to the application program in a target language type in a preset language type library according to the pushing channel, and acquiring a pushing log corresponding to the message to be pushed;
and testing the message to be pushed in the target language according to the push log until the message to be pushed is tested in a plurality of languages in the preset language library.
Optionally, the step of determining a push channel for pushing the message to be pushed corresponding to the push event includes:
judging whether an application process corresponding to the application program is in a survival state, and if the application process is in the survival state, determining that the push channel is a long connection channel;
and if the push channel is not in the survival state, determining that the push channel is a third-party channel.
Optionally, the step of determining that the push channel is a third-party channel includes:
acquiring an application log corresponding to the application program, and determining whether the call to the third-party interface is successful according to the application log;
and if the calling is successful, executing the step of determining that the push channel is a third-party channel.
Optionally, the step of determining that the push channel is a third-party channel includes:
and searching channel information in the application log, determining a third-party channel based on the channel information, and setting the third-party channel as the push channel.
Optionally, the step of determining a push channel for pushing the message to be pushed corresponding to the push event includes:
if the push channel is a long connection channel, establishing long connection communication with the application program;
and if the pushing channel is a third-party channel, establishing communication connection with a third-party interface corresponding to the third-party channel.
Optionally, the step of determining a push channel for pushing the message to be pushed corresponding to the push event includes:
judging whether a terminal corresponding to the application program is provided with a preset application or not, and if the preset application is provided, judging whether the preset application is associated with the application program or not;
and if the push channel is associated with the application program, determining the push channel as a preset application channel.
Optionally, the step of testing the message to be pushed in the target language according to the push log includes:
analyzing the push log to obtain a message analysis result;
and acquiring a message reference result corresponding to the target language, and testing the message to be pushed in the target language according to the message analysis result and the message reference result.
Optionally, the step of testing the message to be pushed in the target language according to the message parsing result and the message reference result includes:
comparing the message theme in the message analysis result with the reference theme in the message reference result, and judging whether the message theme is consistent with the reference theme;
if the message theme is consistent with the reference theme, judging whether the message content in the message analysis result is consistent with the reference content in the message reference result;
and if the message content is consistent with the reference content, completing the test of the message to be pushed in the target language.
Optionally, the step of determining whether the message content in the message parsing result and the reference content in the message reference result are consistent includes:
if the message content is inconsistent with the reference content, recording the message to be pushed, the target language and the message content, and counting the content times of the inconsistency between the message content and the reference content.
Optionally, the step of determining whether the message topic and the reference topic are consistent includes:
if the message theme is inconsistent with the reference theme, recording the message to be pushed, the target language and the message theme, and counting the number of times of the theme with inconsistent message theme and reference theme.
Optionally, after the step of testing the message to be pushed in the target language according to the push log, the step of:
judging whether a plurality of languages in the preset language library all carry test completion marks or not, and if the plurality of languages in the preset language library all carry the test completion marks, judging that the plurality of languages in the preset language library all test the message to be pushed;
and if the language to be pushed does not carry the test completion identification exists in the plurality of languages, determining the language to be pushed as a target language, and pushing the message to be pushed to the application program in the target language in a preset language library according to the pushing channel.
Optionally, the step of pushing the message to be pushed in a target language type in a preset language type library to the application program according to the pushing channel and acquiring a pushing log corresponding to the message to be pushed includes:
determining a target language according to the arrangement sequence of a plurality of languages in the preset language library;
and pushing the message to be pushed to the application program in the target language based on the pushing channel, and acquiring a receiving log of the application program as a pushing log corresponding to the message to be pushed.
Optionally, the step of determining the target language type according to the arrangement order of the languages in the preset language type library includes:
judging whether the target language carries a skip mark, if so, determining languages arranged in a sequence behind the target language according to the arrangement sequence;
and determining the languages arranged in the next sequence after the target language as the target language.
Optionally, the step of determining the target language type according to the arrangement sequence of the languages in the preset language type library includes:
judging whether the languages in the preset language library contain a language carrying a setting identifier, and if the language carrying the setting identifier contains the language carrying the setting identifier, determining the language carrying the setting identifier as the target language;
and if the language carrying the setting identification is not contained, executing the step of determining the target language from a plurality of languages according to the arrangement sequence.
Optionally, when a push event triggered by a device interface of an intelligent device in an access application is received, the step of determining a push channel for pushing a message to be pushed corresponding to the push event includes:
judging whether the application program starts a message pushing function, if the message pushing function is started, executing a step of determining a pushing channel for pushing a message to be pushed corresponding to a pushing event when the pushing event triggered by a device interface of intelligent equipment accessed into the application program is received;
and if the message pushing function is not started, starting the message pushing function based on the communication interface corresponding to the application program.
Optionally, the application is a camera application, and the device interface at least includes a camera interface, a doorbell interface, and a gateway interface.
Optionally, the languages included in the preset language library include simplified chinese, traditional chinese, english, korean, german, russian, and italian.
Further, to achieve the above object, the present invention further provides a multilingual message push test apparatus, including:
the device comprises a determining module, a pushing module and a pushing module, wherein the determining module is used for determining a pushing channel for pushing a message to be pushed corresponding to a pushing event when the pushing event triggered by a device interface of intelligent equipment in an access application program is received;
the pushing module is used for pushing the message to be pushed to the application program in a target language type in a preset language type library according to the pushing channel and acquiring a pushing log corresponding to the message to be pushed;
and the testing module is used for testing the message to be pushed in the target language according to the pushing log until the message to be pushed is tested in a plurality of languages in the preset language library.
Further, to achieve the above object, the present invention further provides a multilingual-based message push test apparatus, including a memory, a processor, and a multilingual-based message push test program stored in the memory and executable on the processor, wherein the multilingual-based message push test program, when executed by the processor, implements the steps of the multilingual-based message push test method as described above.
Further, to achieve the above object, the present invention further provides a storage medium, on which a message push test program based on multiple languages is stored, and the message push test program based on multiple languages realizes the steps of the message push test method based on multiple languages when executed by a processor.
According to the message push test method, the message push test device, the message push test equipment and the message push test storage medium based on multiple languages, when a push event triggered by an equipment interface in an access application program is received, a push channel for pushing a message to be pushed corresponding to the push event is determined; pushing a message to be pushed in a target language type in a preset language type library to an application program according to a pushing channel, and acquiring a pushing log generated by the application program after the message to be pushed is pushed; and then testing the message to be pushed in the target language according to the push log, and repeating the steps until the message to be pushed in a plurality of languages in the preset language library is tested. Therefore, the message to be pushed is pushed through the automatic determination of the pushing channel, and the pushed pushing log is automatically acquired, so that the message to be pushed is tested in the target language, the manual operation in the message pushing test process is avoided, and the test efficiency is improved; and meanwhile, messages to be pushed are circularly pushed in a plurality of languages in a preset library, so that the multilingual test of message pushing is realized.
Detailed Description
It should be understood that the specific embodiments described herein are merely illustrative of the invention and are not intended to limit the invention.
The invention provides a message push test device based on multiple languages, and referring to fig. 1, fig. 1 is a schematic structural diagram of a hardware operating environment related to an embodiment of the message push test device based on multiple languages.
As shown in fig. 1, the multilingual-based message push test apparatus may include: aprocessor 1001, such as a CPU, acommunication bus 1002, auser interface 1003, anetwork interface 1004, and amemory 1005. Wherein acommunication bus 1002 is used to enable connective communication between these components. Theuser interface 1003 may include a Display screen (Display), an input unit such as a Keyboard (Keyboard), and theoptional user interface 1003 may also include a standard wired interface, a wireless interface. Thenetwork interface 1004 may optionally include a standard wired interface, a wireless interface (e.g., WI-FI interface). Thememory 1005 may be a high-speed RAM memory or a non-volatile memory (e.g., a magnetic disk memory). Thememory 1005 may optionally be a storage multilingual message-push test device independent of theprocessor 1001 described above.
It will be appreciated by a person skilled in the art that the hardware structure of the multilingual-based message push test device shown in fig. 1 does not constitute a limitation of the multilingual-based message push test device, and may comprise more or less components than those shown, or some components in combination, or a different arrangement of components.
As shown in fig. 1, amemory 1005, which is a storage medium, may include therein an operating system, a network communication module, a user interface module, and a multi-language based message push test program. The operating system is a program for managing and controlling hardware and software resources of the multilingual-based message push test equipment, and supports the operation of a network communication module, a user interface module, the multilingual-based message push test program and other programs or software; the network communication module is used to manage and control thenetwork interface 1004; the user interface module is used to manage and control theuser interface 1003.
In the hardware structure of the multi-language based message pushing test equipment shown in fig. 1, thenetwork interface 1004 is mainly used for connecting with a background server and communicating data with the background server; theuser interface 1003 is mainly used for connecting a client (user side) and performing data communication with the client; theprocessor 1001 may call the multilingual-based message push test program stored in thememory 1005 and perform the following operations:
when a push event triggered by an equipment interface of intelligent equipment in an access application program is received, determining a push channel for pushing a message to be pushed corresponding to the push event;
pushing the message to be pushed to the application program in a target language type in a preset language type library according to the pushing channel, and acquiring a pushing log corresponding to the message to be pushed;
and testing the message to be pushed in the target language according to the push log until the message to be pushed is tested in a plurality of languages in the preset language library.
Further, the step of determining a push channel for pushing the message to be pushed corresponding to the push event includes:
judging whether an application process corresponding to the application program is in a survival state, and if the application process is in the survival state, determining that the push channel is a long connection channel;
and if the push channel is not in the survival state, determining that the push channel is a third-party channel.
Further, before the step of determining that the push channel is a third-party channel, theprocessor 1001 may call a multilingual-based message push test program stored in thememory 1005, and perform the following operations:
acquiring an application log corresponding to the application program, and determining whether the call to the third-party interface is successful according to the application log;
and if the calling is successful, executing the step of determining that the push channel is a third-party channel.
Further, the step of determining that the push channel is a third-party channel includes:
and searching channel information in the application log, determining a third-party channel based on the channel information, and setting the third-party channel as the push channel.
Further, after the step of determining a push channel for pushing a message to be pushed corresponding to the push event, theprocessor 1001 may call a multi-language based message push test program stored in thememory 1005, and perform the following operations:
if the push channel is a long connection channel, establishing long connection communication with the application program;
and if the pushing channel is a third-party channel, establishing communication connection with a third-party interface corresponding to the third-party channel.
Further, the step of determining a push channel for pushing the message to be pushed corresponding to the push event includes:
judging whether a terminal corresponding to the application program is provided with a preset application or not, and if the preset application is provided, judging whether the preset application is associated with the application program or not;
and if the push channel is associated with the application program, determining the push channel as a preset application channel.
Further, the step of testing the message to be pushed in the target language according to the push log includes:
analyzing the push log to obtain a message analysis result;
and acquiring a message reference result corresponding to the target language, and testing the message to be pushed in the target language according to the message analysis result and the message reference result.
Further, the step of testing the message to be pushed in the target language according to the message parsing result and the message reference result includes:
comparing the message theme in the message analysis result with the reference theme in the message reference result, and judging whether the message theme is consistent with the reference theme;
if the message theme is consistent with the reference theme, judging whether the message content in the message analysis result is consistent with the reference content in the message reference result;
and if the message content is consistent with the reference content, completing the test of the message to be pushed in the target language.
Further, after the step of determining whether the message content in the message parsing result and the reference content in the message reference result are consistent, theprocessor 1001 may call the multi-language based message push test program stored in thememory 1005, and perform the following operations:
if the message content is inconsistent with the reference content, recording the message to be pushed, the target language and the message content, and counting the content times of the inconsistency between the message content and the reference content.
Further, the step of judging whether the message topic and the reference topic are consistent comprises:
if the message theme is inconsistent with the reference theme, recording the message to be pushed, the target language and the message theme, and counting the number of times of the theme with inconsistent message theme and reference theme.
Further, after the step of testing the message to be pushed in the target language according to the push log, theprocessor 1001 may call a multilingual-based message push test program stored in thememory 1005, and perform the following operations:
judging whether a plurality of languages in the preset language library all carry test completion marks or not, and if the plurality of languages in the preset language library all carry the test completion marks, judging that the plurality of languages in the preset language library all test the message to be pushed;
and if the language to be pushed does not carry the test completion identification exists in the plurality of languages, determining the language to be pushed as a target language, and pushing the message to be pushed to the application program in the target language in a preset language library according to the pushing channel.
Further, the step of pushing the message to be pushed to the application program in a target language type in a preset language type library according to the pushing channel and acquiring a pushing log corresponding to the message to be pushed includes:
determining a target language according to the arrangement sequence of a plurality of languages in the preset language library;
and pushing the message to be pushed to the application program in the target language based on the pushing channel, and acquiring a receiving log of the application program as a pushing log corresponding to the message to be pushed.
Further, after the step of determining the target language according to the arrangement order of the languages in the preset language library, theprocessor 1001 may call the message pushing test program based on multiple languages stored in thememory 1005, and perform the following operations:
judging whether the target language carries a skip mark, if so, determining languages arranged in a sequence behind the target language according to the arrangement sequence;
and determining the languages arranged in the next sequence after the target language as the target language.
Further, before the step of determining the target language according to the sequence of the languages in the preset language library, theprocessor 1001 may call a message pushing test program based on multiple languages stored in thememory 1005, and perform the following operations:
judging whether the languages in the preset language library contain a language carrying a setting identifier, and if the language carrying the setting identifier contains the language carrying the setting identifier, determining the language carrying the setting identifier as the target language;
and if the language carrying the setting identification is not contained, executing the step of determining the target language from a plurality of languages according to the arrangement sequence.
Further, before the step of determining a push channel for pushing a to-be-pushed message corresponding to the push event when receiving a push event triggered by a device interface of the smart device in the access application, theprocessor 1001 may call a multi-language-based message push test program stored in thememory 1005, and perform the following operations:
judging whether the application program starts a message pushing function, if the message pushing function is started, executing a step of determining a pushing channel for pushing a message to be pushed corresponding to a pushing event when the pushing event triggered by a device interface of intelligent equipment accessed into the application program is received;
and if the message pushing function is not started, starting the message pushing function based on the communication interface corresponding to the application program.
Further, the application program is a camera application program, and the device interface at least comprises a camera interface, a doorbell interface and a gateway interface.
Furthermore, the languages included in the preset language library include simplified Chinese, traditional Chinese, English, Korean, German, Russian and Italian.
The specific implementation of the multilingual-based message push test apparatus of the present invention is substantially the same as the following embodiments of the multilingual-based message push test method, and will not be described herein again.
The invention also provides a message push test method based on multiple languages.
Referring to fig. 2, fig. 2 is a flowchart illustrating a multilingual message push test method according to a first embodiment of the present invention.
While a logical order is shown in the flow chart, in some cases, the steps shown or described may be performed in an order different from that shown or described herein. Specifically, in the multilingual message push test method according to this embodiment, the multilingual message push test method includes:
step S10, when a push event triggered by an equipment interface of intelligent equipment in an access application program is received, determining a push channel for pushing a message to be pushed corresponding to the push event;
the multilingual message push test method is applied to the server and is suitable for testing messages pushed to the application program in multiple languages through the server. The application program may be a program for implementing smart home control, and the embodiment takes a camera application program as an example for description; in addition, a plurality of intelligent devices such as an outdoor camera, an indoor AI camera, a doorbell embedded camera, a gateway and the like are connected to the camera application program. When any one of the accessed devices triggers the test message item, the message is automatically pushed to the application software in different languages through the server, so that the automatic test of the message in different languages is realized.
Specifically, each intelligent device, in addition to accessing to the application program, establishes a communication connection with the server through a respective device interface, such as a camera interface corresponding to the above-mentioned camera, a doorbell interface of a doorbell, a gateway interface of a gateway, and the like. In the test process, when receiving a push event triggered by the intelligent device in the access application program through the device interface of the intelligent device, the server firstly determines a message to be pushed corresponding to the push event, and further determines a push channel for pushing the message to be pushed. The method comprises the steps of setting a push event to be tested according to different application programs and types of intelligent equipment of the accessed application programs. For example, a push event of a suspicious person is set for an outdoor camera, a push event of a crying baby is set for an indoor camera, and the like. Different trigger events correspond to different messages to be pushed, all the push events and the corresponding messages to be pushed are set as a list to be tested, and testing is triggered in sequence according to the arrangement sequence of all the push events in the list to be tested.
Further, when receiving any one of the push events, the server searches for the message to be pushed corresponding to the push event. And determining a push channel for pushing the message to be pushed according to the process survival state between the server and the application program. The process alive state between the server and the application characterizes a state of direct communication between the application and the server, including a state in which the process between the application and the server is alive and a state in which the process between the application and the server is killed. Correspondingly, when the push channel represents the push of the message to be pushed, the communication mode between the application program and the server comprises long connection communication for process survival and third party communication for process killing.
Understandably, the server performs the message pushing test on the application program on the premise that the application program starts the message pushing function. Therefore, when a push event triggered by a device interface of an intelligent device accessing an application program is received, the step of determining a push channel for pushing a message to be pushed corresponding to the push event includes:
a1, judging whether the application program starts a message pushing function, if the message pushing function is started, executing a step of determining a pushing channel for pushing a message to be pushed corresponding to a pushing event when the pushing event triggered by a device interface of intelligent equipment accessed into the application program is received;
step a2, if the message pushing function is not started, starting the message pushing function based on the communication interface corresponding to the application program.
Further, a push test request is sent to the application program, and whether the application program starts a message push function is judged according to the sending state of the push test request or the reply information of the application program to the push test request. If the sending state of the push test request is successful sending or the reply message is effective pushing, the application program is judged to start the message push function, the message can be normally pushed to the application program, and a push channel for pushing the message to be pushed corresponding to the push event can be determined when the push event triggered by the device interface of any intelligent device in the access application program is received. Otherwise, if the sending state of the push test request is sending failure or the reply message is invalid push, the message push function is started through the communication interface corresponding to the application program. The communication interface is an interface for establishing communication connection between the server and the application program, and the message pushing function is started by setting the communication state of the communication interface from a closed state to an open state.
Further, the step of determining a push channel for pushing the message to be pushed corresponding to the push event includes:
b1, judging whether a terminal corresponding to the application program is provided with a preset application, and if so, judging whether the preset application is associated with the application program;
step b2, if the push channel is associated with the application program, determining the push channel as a preset application channel.
Furthermore, a push channel for pushing a message to be pushed is also provided with a mechanism established by a preset application, in addition to the establishment of the survival state of the process between the server and the application program. No matter what state the process between the server and the application program is, as long as the terminal installed by the application program installs the preset application in addition to the application program, and the application program is associated with the preset application, a push channel can be formed through the preset application. Specifically, it is determined whether a terminal corresponding to the application program has a preset application installed, and the determination may be performed by sending an inquiry request to the terminal. And if the preset application is determined to be installed through the inquiry, continuously judging whether the preset application is associated with the application program. And if the correlation exists, forming the correlation relationship into a preset application channel as a push channel. And the message pushing test through the pushing channel is realized by sending a message to the preset application. The preset application can be instant messaging software, such as WeChat; presetting a relation between an application and an application program, wherein the relation is used for receiving related information of the application program through the preset application; such as by micro-noting the corresponding well-known number or applet, etc.
Step S20, pushing the message to be pushed in a target language type in a preset language type library to the application program according to the pushing channel, and acquiring a pushing log corresponding to the message to be pushed;
furthermore, a preset language database containing a plurality of languages is preset, and the languages contained in the preset language database include at least simplified Chinese, traditional Chinese, English, Korean, German, Russian and Italian. And pushing the messages to be pushed to the application program one by one according to the arrangement sequence of the languages in the preset language library until the messages to be pushed are pushed in all the languages. Determining the language at the current moment according to the language and the arrangement sequence pushed at the previous moment, taking the language pushed at the current moment as a target language in a preset language library, and further pushing the message to be pushed to an application program in the target language through a pushing channel. For each language push, a push log corresponding to the message to be pushed is obtained, that is, a log generated by the application program according to the push condition of the message to be pushed, so that the push log can test the message pushed in each language.
Step S30, according to the push log, testing the message to be pushed in the target language until all the languages in the preset language library test the message to be pushed.
Furthermore, after the server obtains the push log generated by the application program for the target language, the server can test the message to be pushed in the target language according to the push log. The push log at least comprises the message theme and the message content of the message to be pushed received by the application program, and the message pushed in the target language is tested through the consistency between the received message theme and the received message content and the reference theme and the reference content of the message to be pushed, so that a test result is generated. And the test of the message to be pushed on each language is not completed until the message to be pushed is pushed in each language in the preset language library and a test result is generated. And for the language completing the test, adding a completing identifier, and determining whether the test on each language is completed by judging whether each language in the preset language library carries the completing identifier. Specifically, according to the push log, the step of testing the message to be pushed in the target language includes:
step c1, judging whether the languages in the preset language library all carry test completion marks, and if so, judging that the languages in the preset language library all test the message to be pushed;
step c2, if there is a language to be tested that does not carry the test completion identifier in the plurality of languages, determining the language to be tested as a target language, and executing the step of pushing the message to be pushed to the application program in the target language in a preset language library according to the pushing channel.
Further, detecting each language in the preset language library, judging whether each language carries a test completion identifier, and if so, indicating that the plurality of languages in the preset language library all push the message to be pushed, and completing the test of the message to be pushed on each language. Otherwise, if it is determined that there is a language without the test completion identifier in the plurality of languages, it is determined that the language is not tested yet and is the language to be tested that needs to be tested, so that the language is determined as the target language. And then pushing the message to be pushed to the application program in the target language through the pushing channel until all the languages to be pushed are pushed as the target language to obtain a pushing log, and completing the test of the message to be pushed in each language.
The invention relates to a message push test method based on multiple languages, which comprises the steps of firstly determining a push channel for pushing a message to be pushed corresponding to a push event when the push event triggered by an equipment interface in an access application program is received; pushing a message to be pushed in a target language type in a preset language type library to an application program according to a pushing channel, and acquiring a pushing log generated by the application program after the message to be pushed is pushed; and then testing the message to be pushed in the target language according to the push log, and repeating the steps until the message to be pushed in a plurality of languages in the preset language library is tested. Therefore, the message to be pushed is pushed through the automatic determination of the pushing channel, and the pushed pushing log is automatically acquired, so that the message to be pushed is tested in the target language, the manual operation in the message pushing test process is avoided, and the test efficiency is improved; and meanwhile, messages to be pushed are circularly pushed in a plurality of languages in a preset library, so that the multilingual test of message pushing is realized.
Further, based on the first embodiment of the message push test method based on multiple languages, the second embodiment of the message push test method based on multiple languages is provided.
The second embodiment of the multilingual-based message push test method differs from the first embodiment of the multilingual-based message push test method in that the step of determining a push channel for pushing a message to be pushed corresponding to the push event comprises:
step S11, determining whether the application process corresponding to the application program is in a live state, and if the application process is in a live state, determining that the push channel is a long connection channel.
Step S12, if not in a survival state, determining that the push channel is a third party channel.
In the embodiment, a process used for communicating with the server in the application program is used as the application process corresponding to the application program, and the push channel is determined by determining the survival state of the application process. Specifically, whether the application process corresponding to the application program is in a survival state is judged, and if the application process is in the survival state, the push channel is determined to be the long connection channel. The long connection channel is a channel for realizing communication through long connection, and one connection of the long connection can continuously send a plurality of data packets, so that the method is suitable for point-to-point communication with frequent operation. And if the application process is determined not to be in the survival state, namely the application process is killed, determining the push channel as a third-party channel, and pushing the message through a communication channel of a third party.
Understandably, the communication with the third party is realized by calling the third party interface, so that whether the calling of the third party interface is successful is determined before the pushing channel is determined as the third channel. Specifically, the step of determining that the push channel is the third-party channel includes:
step S121, obtaining an application log corresponding to the application program, and determining whether the call to the third-party interface is successful according to the application log;
and step S122, if the calling is successful, executing the step of determining that the push channel is a third-party channel.
Further, in the communication transmission among the server, the third party and the application program, an application log is generated in the application program, the application log is obtained, the communication connection state among the server, the third party and the application program is read out from the application log, and whether the calling of the third party interface is successful or not is determined through the communication connection state. And if the communication connection state is the connection state and the representation succeeds in calling the third-party interface, determining that the push channel is the third-party channel. Specifically, the step of determining that the push channel is a third-party channel includes:
step S123, searching the channel information in the application log, determining a third party channel based on the channel information, and setting the third party channel as the push channel.
Furthermore, the application log includes channel information, such as a channel number and a reach identifier, in addition to the information of the communication connection status. And searching channel information in the application log, determining a channel represented by the channel information as a third-party channel, and setting the third channel as a pushing channel for pushing the message to be pushed.
Further, the step of determining a push channel for pushing the message to be pushed corresponding to the push event includes:
step d1, if the push channel is a long connection channel, establishing long connection communication with the application program;
and d2, if the push channel is a third-party channel, establishing communication connection with a third-party interface corresponding to the third-party channel.
Understandably, the communication connections established between the server and the application are different for different communication channels. If the push channel is determined to be the long connection channel, long connection communication is established between the push channel and the application program, so that message pushing is carried out through the long connection communication, and multi-language testing of the pushed messages is achieved. And if the pushing channel is determined to be the third-party channel, establishing communication connection with a third-party interface corresponding to the ground-party channel so as to push the message through the communication connection of the third party and realize the multi-language test of the pushed message.
It should be noted that, the multi-language test for message pushing in this embodiment not only tests whether the pushed message can be pushed to the application program in multiple languages, but also tests the correct pushing of various pushing channels. Namely, the correct pushing of the long connection channel, the correct pushing of the third party channel and the correct pushing of the preset application channel are tested. And the preset application channel and the long connection channel or the third-party channel coexist, that is, no matter whether the application process is alive or not, as long as the preset application is associated with the application program, the push can be performed through the preset application channel. During testing, the application process is set to be in a survival state, and the message to be pushed is pushed in various languages through the long connecting channel and the preset application channel so as to test the long connecting channel and the preset application channel. And when the application process is set to be in a killing state, pushing the message to be pushed in various languages through the third party channel and the preset application channel so as to test the third party channel and the preset application channel. Therefore, the multi-language message push test of the long connection channel, the third-party channel and the preset application channel is realized.
The implementation determines the push channel as a third-party channel or a long connection channel according to the survival state of the application process, and then pushes the message to be pushed in different languages according to different push channels. The method and the device realize the test of pushing the messages to be pushed in different languages, and simultaneously realize the test of pushing the messages to be pushed in different types of pushing channels, thereby realizing multi-directional test in the message pushing process.
Further, based on the first or second embodiment of the multilingual message push test method of the present invention, a third embodiment of the multilingual message push test method of the present invention is proposed.
The third embodiment of the multilingual-based message push test method differs from the first or second embodiment of the multilingual-based message push test method in that the step of testing the message to be pushed in the target language according to the push log comprises:
step S31, analyzing the push log to obtain a message analysis result;
step S32, obtaining a message reference result corresponding to the target language, and testing the message to be pushed in the target language according to the message parsing result and the message reference result.
In this embodiment, the message to be pushed in the target language is tested according to the message reference result of the message to be pushed in the target language. Specifically, analyzing the push log to obtain a message analysis result; the message parsing result characterizes a message received by the application program, and comprises a message body and message content. And further acquiring a message reference result of the message to be pushed in the target language, and taking the message reference result as a message reference result corresponding to the target language. The message reference result represents the actual message pushed by the message to be pushed in the target language, and comprises a message theme and reference content. And testing the message to be pushed in the target language according to the consistency between the message analysis result actually received and the message reference result actually sent. Since the message parsing result and the message reference result both include the subject and the content, the consistency between the two can be reflected by the subject and the content. Specifically, the step of testing the message to be pushed in the target language according to the message parsing result and the message reference result includes:
step S321, comparing the message theme in the message analysis result with the reference theme in the message reference result, and judging whether the message theme is consistent with the reference theme;
step S322, if the message theme is consistent with the reference theme, judging whether the message content in the message analysis result is consistent with the reference content in the message reference result;
step S323, if the message content is consistent with the reference content, completing the test of the message to be pushed in the target language.
Further, comparing the message theme in the message analysis result with the reference theme in the message reference result, and judging whether the message theme is consistent with the reference theme; if the message content in the message analysis result is consistent with the reference content in the message reference result, whether the message content in the message analysis result is consistent with the reference content in the message reference result is continuously judged. If the message content is judged to be consistent with the reference content, the message pushed by the target language is consistent with the message received by the application program, the message to be pushed can be successfully pushed to the application program by the target language through the pushing channel, and the test of the message to be pushed by the target language is completed.
Further, the step of determining whether the message content in the message parsing result and the reference content in the message reference result are consistent includes:
step S324, if the message content is inconsistent with the reference content, recording the message to be pushed, the target language and the message content, and counting the content times of the inconsistency between the message content and the reference content.
If the message content is judged to be inconsistent with the reference content, the message pushed by the target language is inconsistent with the message received by the application program, and the message to be pushed is unsuccessfully pushed to the application program in the target language through the pushing channel. At this time, the message to be pushed, the target language and the message content are recorded, so as to determine the reason of the inconsistency through the recording. Meanwhile, counting and counting the number of inconsistent times between the message content and the reference content to obtain the content number of times; and reflecting the failure probability of pushing the to-be-pushed message on the content in the target language by the pushing channel through the counted content times. When the probability is greater than a set value and the number of times of the representation of the pushing failure on the content is large, outputting optimization information for pushing the message to be pushed in the target language to optimize a pushing mechanism and improve the pushing success rate.
Further, the step of judging whether the message topic and the reference topic are consistent comprises:
step S325, if the message topic is inconsistent with the reference topic, recording the message to be pushed, the target language and the message topic, and counting the times of topics with inconsistent message topics and reference topics.
If the message theme is judged to be inconsistent with the reference theme, the message pushed by the target language is inconsistent with the message received by the application program, and the message to be pushed is unsuccessfully pushed to the application program in the target language through the pushing channel. At this time, the message to be pushed, the target language and the message theme are recorded, so as to determine the reason of the inconsistency through the recording. Meanwhile, counting and counting the number of inconsistent times between the message theme and the reference theme to obtain the number of times of the theme; and reflecting the failure probability of pushing the to-be-pushed message on the topic in the target language by the pushing channel through the counted topic times. When the probability is greater than a set value and the number of times of pushing failure on the theme is represented to be large, outputting optimization information for pushing the message to be pushed in the target language to optimize a pushing mechanism and improve the pushing success rate.
In this embodiment, a message reference result including a reference topic and reference content is set, and a message analysis result including a message topic and a message content is verified, so that a message to be pushed is tested in a target language. The message to be pushed received by the application program is ensured to be consistent with the message to be pushed in the message theme and the message content, and the multidimensional test of the message to be pushed is facilitated.
Further, based on the first, second or third embodiment of the multilingual message push test method of the present invention, a fourth embodiment of the multilingual message push test method of the present invention is proposed.
The fourth embodiment of the multilingual-based message push test method differs from the first, second, or third embodiment of the multilingual-based message push test method in that the step of pushing the message to be pushed to the application program in the target language in the preset language library according to the push channel and acquiring the push log corresponding to the message to be pushed comprises:
step S21, determining a target language according to the arrangement sequence of a plurality of languages in the preset language library;
furthermore, the languages in the preset language library are arranged in a certain arrangement order, and when the message to be pushed is pushed to the application program in the target language, the current target language is determined according to the language pushed last time and the arrangement order. And pushing the language arranged at the first position in the arrangement sequence as a target language directly corresponding to the first pushing. In addition, the embodiment presets language support designation in the language library, that is, designates a certain language as a target language. Specifically, the step of determining the target language type according to the arrangement sequence of the languages in the preset language type library comprises:
step e1, judging whether the languages in the preset language library contain the language carrying the setting identifier, and if the languages contain the language carrying the setting identifier, determining the language carrying the setting identifier as the target language;
step e2, if the language carrying the setting identifier is not included, executing the step of determining the target language from a plurality of languages according to the arrangement sequence.
Further, the specified language represents the language required to be specified as the target language by setting the identifier. And judging whether the languages in the preset language library contain the language carrying the setting identification, if so, indicating that the language is specified as the target language, and determining the language as the target language. If each language of the preset language library does not carry a setting identifier, namely the language carrying the setting identifier is not contained, the target language is determined from the languages to push the message to be pushed according to the arrangement sequence of the languages in the preset language library.
It should be noted that, in this embodiment, besides supporting designation, skipping is also supported for a plurality of languages in the preset threshold library, that is, when determining the target language according to the arrangement sequence of the languages in the preset language library, some languages are skipped, and are not selected as the target language. Specifically, the step of determining the target language type according to the arrangement sequence of the plurality of language types in the preset language type library includes:
step f1, judging whether the target language carries a skip mark, if so, determining the languages arranged in the next sequence of the target language according to the arrangement sequence;
step f2, determining the language arranged in the order behind the target language as the target language.
Further, after a certain language in the preset language library is set as a target language according to the arrangement sequence, whether the target language carries a skip identifier is judged, and the skip identifier represents an identifier which is not set as the target language. If the language carrying the skip mark is judged, searching the languages arranged in the sequence behind the target language according to the arrangement sequence, and determining the searched languages as the target language. Considering that the searched language also carries the skip identifier, the method continues to judge whether the target language determined again carries the skip identifier. And if the skip identifier is carried, continuously searching the next sequential language until the determined target language is judged not to carry the skip identifier, and carrying out a push test on the message to be pushed.
Step S22, based on the push channel, pushing the message to be pushed to the application program in the target language, and acquiring a receiving log of the application program as a push log corresponding to the message to be pushed.
Furthermore, the message to be pushed is pushed to the application program in the target language through the pushing channel, and the application program receives the message to be pushed and generates a receiving log. And the server requests the application program to acquire the receiving log and takes the acquired receiving log as a pushing log corresponding to the message to be pushed. The method is used for testing the message to be pushed in the target language according to the receiving condition of the message to be pushed represented by the push log by the application program.
This embodiment through the permutation order of a plurality of languages in presetting the language storehouse, jump the mechanism to and appointed mechanism, determine the target language from a plurality of languages in presetting the language storehouse and treat the propelling movement message and carry out the propelling movement, be favorable to treating the propelling movement message with different languages and test, satisfied and treated the propelling movement message and carry out the demand tested with different languages.
The invention also provides a message pushing test device based on multiple languages. The message pushing test device based on multiple languages comprises:
the device comprises a determining module, a pushing module and a pushing module, wherein the determining module is used for determining a pushing channel for pushing a message to be pushed corresponding to a pushing event when the pushing event triggered by a device interface of intelligent equipment in an access application program is received;
the pushing module is used for pushing the message to be pushed to the application program in a target language type in a preset language type library according to the pushing channel and acquiring a pushing log corresponding to the message to be pushed;
and the testing module is used for testing the message to be pushed in the target language according to the pushing log until the message to be pushed is tested in a plurality of languages in the preset language library.
The specific implementation of the multilingual-based message push test apparatus of the present invention is substantially the same as the embodiments of the multilingual-based message push test method described above, and further description thereof is omitted here.
In addition, the embodiment of the invention also provides a storage medium.
The storage medium stores a multi-language-based message push test program, and the steps of the multi-language-based message push test method are implemented when the multi-language-based message push test program is executed by the processor.
The storage medium of the present invention may be a computer storage medium, and the specific implementation manner of the storage medium of the present invention is substantially the same as that of each embodiment of the message push test method based on multiple languages, which is not described herein again.
The present invention is described in connection with the accompanying drawings, but the present invention is not limited to the above embodiments, which are only illustrative and not restrictive, and those skilled in the art can make various changes without departing from the spirit and scope of the invention as defined by the appended claims, and all changes that come within the meaning and range of equivalency of the specification and drawings that are obvious from the description and the attached claims are intended to be embraced therein.