CN115098383A - Message query method, device, electronic equipment and storage medium - Google Patents

Message query method, device, electronic equipment and storage medium Download PDF

Info

Publication number
CN115098383A
CN115098383A CN202210753983.0A CN202210753983A CN115098383A CN 115098383 A CN115098383 A CN 115098383A CN 202210753983 A CN202210753983 A CN 202210753983A CN 115098383 A CN115098383 A CN 115098383A
Authority
CN
China
Prior art keywords
message
query
queue
topic
message queue
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202210753983.0A
Other languages
Chinese (zh)
Inventor
章晨
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Ping An Bank Co Ltd
Original Assignee
Ping An Bank Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Ping An Bank Co Ltd filed Critical Ping An Bank Co Ltd
Priority to CN202210753983.0A priority Critical patent/CN115098383A/en
Publication of CN115098383A publication Critical patent/CN115098383A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/36Preventing errors by testing or debugging software
    • G06F11/3668Software testing
    • G06F11/3672Test management
    • G06F11/368Test management for test version control, e.g. updating test cases to a new software version
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/36Preventing errors by testing or debugging software
    • G06F11/3668Software testing
    • G06F11/3672Test management
    • G06F11/3692Test management for test results analysis
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/30Information retrieval; Database structures therefor; File system structures therefor of unstructured textual data
    • G06F16/33Querying
    • G06F16/332Query formulation

Abstract

The embodiment of the invention discloses a message query method, a message query device, electronic equipment and a storage medium; the method comprises the steps that in response to the operation of subscribing a target topic for a data management platform, the target topic is set as the topic subscribed by the data management platform, a first message queue message generated by a client with an applied version in a history mode is obtained, the first message queue message is led into a client with a test version to be subjected to flow playback, the client with the test version is triggered to generate a second message queue message, the second message queue message is written into a message alignment column of a corresponding topic, the second message queue message is read from a message queue corresponding to the target topic, the second message queue message under the target topic is screened to obtain an inquireable message, a preset message inquiry condition is obtained, and the target inquiry message is inquired from the inquireable message based on the message inquiry condition; the method can reduce the dependence on manpower and improve the testing efficiency of the message production application on the basis of ensuring the accuracy of message query.

Description

Message query method, device, electronic equipment and storage medium
Technical Field
The present invention relates to the field of testing technologies, and in particular, to a method and an apparatus for querying a message, an electronic device, and a storage medium.
Background
With the rapid development of software development technology, the testing pressure of testers is increasing. When testing some message production applications which can generate messages, the testing personnel is relied on to manually check the message data of the corresponding topic through the message console which collects the messages.
However, by adopting the scheme, when testing is performed on the application with a large amount of output messages, the testers cannot find the messages to be verified in time, and the testing efficiency of the message production application is influenced depending on the human resources of the testers.
Disclosure of Invention
Embodiments of the present invention provide a message query method, an apparatus, an electronic device, and a storage medium, which can reduce dependence on labor, save human resources, and improve test efficiency of message production application on the basis of guaranteeing accuracy of message query.
The embodiment of the invention provides a message query method, which is applied to a data management platform and comprises the following steps:
responding to the operation of subscribing a target topic for the data management platform, and setting the target topic as the topic subscribed by the data management platform, wherein a producer of the target topic is a client of a test version;
acquiring a first message queue message generated by the client history of the applied version;
importing the first message queue message into the client side of the test version for flow playback, and after a second message queue message is generated by a trigger client side, writing the second message queue message into a message alignment of a corresponding topic;
reading a second message queue message from a message queue corresponding to the subscribed target topic;
screening the second message queue message under the target topic to obtain an inquireable message;
and acquiring a preset message query condition, and querying the queriable message to obtain a target query message based on the message query condition.
Correspondingly, an embodiment of the present invention further provides a message query apparatus, including:
the topic setting unit is used for responding to the operation of subscribing a target topic for the data management platform and setting the target topic as the topic subscribed by the data management platform, wherein a producer of the target topic is a client of a test version;
the message acquisition unit is used for acquiring a first message queue message generated by the client history of the applied version;
the flow playback unit is used for importing the first message queue message into the client of the test version for flow playback, and triggering the client to write a second message queue message into a message alignment column of a corresponding topic after the client generates the second message queue message;
the message reading unit is used for reading a second message queue message from a message queue corresponding to the subscribed target topic;
the message screening unit is used for screening the second message queue message under the target topic to obtain an inquireable message;
and the message query unit is used for acquiring preset message query conditions and querying the queriable messages to obtain target query messages based on the message query conditions.
Optionally, the message screening unit is configured to analyze the second message queue messages under the target topic to obtain a message type of each second message queue message and at least one message parameter of each second message queue message;
determining a message filtering condition corresponding to the message type according to the message type of the second message queue message, wherein the message filtering condition at least comprises a message filtering parameter;
and filtering each second message queue message based on the message filtering parameters and each message parameter to obtain a queriable message.
Optionally, the message parameter includes a message field type of the second message queue message and a field value of the message field type, and the message filtering parameter includes a filtering field type and a filtering field value of the filtering field type;
the message screening unit is configured to perform field filtering on the second message queue message based on a filtering field type in the message filtering parameter and a message field type in the message parameter, and take the second message queue message whose message field type does not match the filtering field type as a queriable message;
and for a second message queue message with a message field type matched with the filtering field type, carrying out field value filtering based on the field value and the filtering field value, and taking the second message queue message with the field value not matched with the filtering field value as a queriable message.
Optionally, the message parameter includes a message field type of the second message queue message and a field value of the message field type, and the message query unit is configured to obtain a message query condition preset by the user, where the message query condition includes a query field type and a query field value;
performing field query on the queryable message based on the query field type and the message field type, and taking the queryable message matched with the query field type and the message field type as a candidate query message;
and for the candidate query message, performing field value query based on the field value and the query field value, and taking the candidate query message with the field value matched with the query field value as a target query message.
Optionally, the message query apparatus provided in the embodiment of the present invention further includes a query condition determining unit, configured to display a query condition setting page in the data management platform, where the query condition setting page at least includes a condition setting control;
and determining a message query condition in response to a condition input operation of the user for the condition setting control.
Optionally, the message query device provided in the embodiment of the present invention further includes a message comparison unit, configured to obtain a first message queue message corresponding to the target topic;
comparing message fields of a first message queue message corresponding to the target topic with the target query message to obtain a message comparison result;
and displaying the message comparison result on a result viewing page of the data management platform.
Optionally, the message obtaining unit is configured to record, in a use process of a client with an applied version, sending association information that the client generates and sends a first message queue message to a message queue under each topic;
according to the sending correlation information, subscribing the topic corresponding to the first message queue message generated by the client;
reading the first message queue message from a message queue corresponding to the topic of the subscription.
Correspondingly, the embodiment of the invention also provides the electronic equipment, which comprises a memory and a processor; the memory stores an application program, and the processor is configured to run the application program in the memory to perform any of the steps of the message query method provided by the embodiments of the present invention.
Accordingly, an embodiment of the present invention further provides a computer-readable storage medium, where multiple instructions are stored, and the instructions are suitable for being loaded by a processor to perform steps in any one of the message query methods provided in the embodiments of the present invention.
In addition, the embodiment of the present invention further provides a computer program product, which includes a computer program or instructions, and when the computer program or instructions are executed by a processor, the computer program or instructions implement the steps in any one of the message query methods provided by the embodiment of the present invention.
By adopting the scheme of the embodiment of the invention, the target topic can be set as the topic subscribed by the data management platform in response to the operation of subscribing the target topic for the data management platform, wherein, the producer of the target topic is a client of a test version, acquires a first message queue message which is generated by the client history of an applied version, guides the first message queue message into the client of the test version for flow playback, triggers the client to generate a second message queue message, writing the second message queue message into a message queue corresponding to a topic, reading the second message queue message from a subscribed message queue corresponding to the target topic, screening the second message queue message under the target topic to obtain an inquireable message, acquiring a preset message inquiry condition, and inquiring the inquireable message based on the message inquiry condition to obtain the target inquiry message; in the embodiment of the invention, the client side of the test version can be triggered to generate the second message queue message by carrying out flow playback on the first message queue message, the second message queue message corresponding to the target topic is automatically collected by subscribing the target topic, and the second message queue message under the target topic is further screened and inquired to obtain the target inquiry message required by the tester.
Drawings
In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the drawings needed to be used in the description of the embodiments will be briefly introduced below, and it is obvious that the drawings in the following description are only some embodiments of the present invention, and it is obvious for those skilled in the art to obtain other drawings based on these drawings without creative efforts.
Fig. 1 is a schematic view of a scenario of a message query method according to an embodiment of the present invention;
FIG. 2 is a flow chart of a message query method according to an embodiment of the present invention;
fig. 3 is a schematic structural diagram of a message query apparatus according to an embodiment of the present invention;
fig. 4 is another schematic structural diagram of a message query apparatus according to an embodiment of the present invention;
fig. 5 is a schematic structural diagram of an electronic device according to an embodiment of the present invention.
Detailed Description
The technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are only a part of the embodiments of the present invention, and not all of the embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
The embodiment of the invention provides a message query method, a message query device, electronic equipment and a computer readable storage medium. Specifically, the embodiment of the present invention provides a message query method suitable for a message query apparatus, which may be integrated in an electronic device.
The electronic device may be a terminal or other devices, including but not limited to a mobile terminal and a fixed terminal, for example, the mobile terminal includes but is not limited to a smart phone, a smart watch, a tablet computer, a notebook computer, a smart car, and the like, wherein the fixed terminal includes but is not limited to a desktop computer, a smart television, and the like.
The electronic device may also be a device such as a server, and the server may be an independent physical server, a server cluster or a distributed system formed by a plurality of physical servers, or a cloud server providing basic cloud computing services such as a cloud service, a cloud database, cloud computing, a cloud function, cloud storage, a Network service, cloud communication, a middleware service, a domain name service, a security service, a CDN (Content Delivery Network), and a big data and artificial intelligence platform, but is not limited thereto.
The message query method of the embodiment of the invention can be realized by a server, and can also be realized by a terminal and the server together.
The following describes the method by taking an example in which the terminal and the server implement the message query method together.
As shown in fig. 1, the message query system provided by the embodiment of the present invention includes a terminal 10, a server 20, and the like; the terminal 10 and the server 20 are connected through a network, for example, a wired or wireless network connection, and the like, wherein the terminal 10 may exist as a terminal for the tester to set the message query condition.
Among them, the terminal 10 may be a terminal that sets a message query condition for a tester, for transmitting the message query condition to the server 20.
The server 20 may be configured to set the target topic as a topic subscribed by the data management platform in response to an operation of subscribing the target topic for the data management platform, where a producer of the target topic is a client in a test version, acquire a first message queue message generated by a history of the client in which the version has been applied, introduce the first message queue message into the client in the test version for traffic playback, trigger the client to write a second message queue message into a message queue corresponding to the topic after generating the second message queue message, read the second message queue message from the message queue corresponding to the subscribed target topic, screen the second message queue message under the target topic to obtain an queriable message, acquire a preset message query condition, and query the queriable message from the queriable message based on the message query condition.
It is understood that, in some embodiments, the step of querying the message performed by the server 20 may also be performed by the terminal 10, which is not limited by the embodiment of the present invention.
The following are detailed below. It should be noted that the following description of the embodiments is not intended to limit the preferred order of the embodiments.
The embodiments of the present invention will be described from the perspective of a message query device, which may be specifically integrated in a server or a terminal.
As shown in fig. 2, the message query method according to the embodiment of the present invention is applied to a data management platform, and the specific flow of the message query method according to the embodiment of the present invention may be as follows:
201. and responding to the operation of subscribing the target topic for the data management platform, and setting the target topic as the topic subscribed by the data management platform, wherein a producer of the target topic is a client of the test version.
The data management platform is a platform program capable of managing message data such as a first message queue message and a second message queue message. Specifically, the data management platform may perform management operations on the message data, including but not limited to screening, querying, comparing, and the like.
Specifically, the target topic is a topic subscribed by the data management platform in the message topics. A message Topic (Topic) is a transmission intermediary between a message producer and a subscriber, through which devices can effect the sending and receiving of messages.
In the embodiment of the invention, the client of the test version is the client which is not formally on-line to the user in the test process. And the client corresponding to the client of the test version can have the client of the applied version or not.
202. And acquiring a first message queue message generated by the client history of the applied version.
Wherein the client of the applied version is the client corresponding to the client of the test version.
Specifically, step 202 may include:
recording the sending association information of a first message queue message generated by the client and sent to the message queue under each topic in the using process of the client with the application version;
subscribing topics corresponding to a first message queue message generated by a client according to the sending association information;
and reading a first message queue message from a message queue corresponding to the subscribed topic.
It can be understood that the same client may generate a plurality of first message queue messages corresponding to different topics during use.
Wherein, the sending related information is information related to the message sending process. For example, the transmission association information may include, but is not limited to, a topic, a transmission time, a transmission object, and the like corresponding to each first message queue message.
Specifically, when subscribing to a topic, the data management platform may subscribe to only a certain topic or a part of topics, or may subscribe to all topics corresponding to the client of the applied version, which is not limited in the embodiment of the present invention.
203. And importing the first message queue message into a client side of the test version for flow playback, and writing the second message queue message into a message alignment column of the corresponding topic after triggering the client side to generate the second message queue message.
In the embodiment of the invention, through flow playback, whether the system can normally run or not can be found through playback in a test environment based on the recorded on-line flow, and the risk caused by the code change of the whole system is reduced.
In addition, during the traffic replay, the test data used in the client of the test version is not considered manufactured, but is the first message queue message that can be used directly. Human resources can be saved, the richness and the authenticity of test cases are guaranteed, and a more comprehensive application scene can be covered.
204. And reading the second message queue message from the message queue corresponding to the subscribed target topic.
In the embodiment of the present invention, the target topic may be a certain topic or a part of topics corresponding to the client side of the test version, or may be all topics corresponding to the client side of the test version, which is not limited in the embodiment of the present invention.
Specifically, when reading the second message queue message, the message queue may be read periodically, or may be read each time a new second message queue message is written into the message queue.
Optionally, each time reading is performed, all the second message queue messages in the message queue may be read, only the second message queue message newly written in the message queue may be read, only the second message queue message written in the message queue after a certain time may be read, and the like.
205. And screening the second message queue message under the target topic to obtain the queryable message.
The inquireable message is a message which can be further inquired by a tester after being screened from the second message queue message.
Specifically, the step of screening the second message queue message under the target topic to obtain the queryable message includes:
analyzing second message queue messages under the target topic to obtain the message type of each second message queue message and at least one message parameter of each second message queue message;
determining a message filtering condition corresponding to the message type according to the message type of the second message queue message, wherein the message filtering condition at least comprises a message filtering parameter;
and filtering the messages in each second message queue based on the message filtering parameters and the message parameters to obtain the queryable messages.
The message parameters may include, but are not limited to, message field types included in the message, message field values corresponding to the respective message field types, default values, lengths, enumerated values, and so on.
The message filtering parameters may include, but are not limited to, message field types included in the message to be filtered, message field values corresponding to the message field types, default values, lengths, enumerated values, and the like.
In some optional embodiments, the message parameter includes a message field type of the second message queue message and a field value of the message field type, the message filtering parameter includes a filtering field type and a filtering field value of the filtering field type, and the step "filtering each second message queue message based on the message filtering parameter and each message parameter to obtain the queryable message" includes:
performing field filtering on the second message queue message based on the filtering field type in the message filtering parameter and the message field type in the message parameter, and taking the second message queue message of which the message field type is not matched with the filtering field type as a queriable message;
and for the second message queue message with the message field type matched with the filtering field type, carrying out field value filtering based on the field value and the filtering field value, and taking the second message queue message with the field value not matched with the filtering field value as a queriable message.
In the embodiment of the invention, a tester can set the message filtering parameters by himself. For example, if a message with a value of 1 in the a field and 2 in the B field needs to be filtered, the tester may configure a 1& & B2 in the data management platform. After the message configuration is enabled, only messages which are in accordance with conditions are written into a message storage position of the data management platform, and other useless messages are filtered.
It will be appreciated that the tester may set different message filtering parameters for different messages.
In some optional embodiments, the message filtering parameters may also include message type to enable filtering of messages of a certain message type or types. For example, the message type in the message filtering parameter may be ROCKETMQ or IBMMQ, etc.
206. And acquiring a preset message query condition, and querying the queryable message to obtain the target query message based on the message query condition.
In some optional examples, the message parameter includes a message field type of the second message queue message and a field value of the message field type, and the step "obtaining a preset message query condition, and obtaining the target query message from the queriable message query based on the message query condition" may specifically include:
acquiring a preset message query condition, wherein the message query condition comprises a query field type and a query field value;
performing field query on the queryable message based on the query field type and the message field type, and taking the queryable message matched with the query field type and the message field type as a candidate query message;
and performing field value query on the candidate query messages based on the field values and the query field values, and taking the candidate query messages with the field values matched with the query field values as target query messages.
For example, the user can find the message data that the user wants to filter according to the condition of the field value in the message and the like in any combination. If the data management platform supports syntax such as jsonnpath or xpath, for example, a tester needs to query a message with eventSeqNo of 123456, the message can be input.
Optionally, the message query method provided by the embodiment of the present invention may further include:
displaying a query condition setting page in the data management platform, wherein the query condition setting page at least comprises a condition setting control;
and determining a message query condition in response to a condition input operation of the user for the condition setting control.
Specifically, the condition setting control may be a text box, and the condition input operation may be a text input operation of the tester for the text box. Alternatively, the condition setting control may be a selection control, and the condition input operation may be a selection operation of the tester for the selection control.
For example, the data management platform may be provided with a selection control for a message type, a selection control for a field type, and the like, and a tester may click the selection control to expand a drop-down list, select a corresponding message type or field type in the list, and the like.
Optionally, the message query method provided in the embodiment of the present invention may further include:
acquiring a first message queue message corresponding to a target topic;
comparing message fields based on a first message queue message corresponding to the target topic and the target query message to obtain a message comparison result;
and viewing a page on a result viewing page of the data management platform, and displaying a message comparison result.
The data management platform may be configured with a data warehouse analysis system, and may compare the first message queue message with the target query message to determine whether a vulnerability exists in a client of the test version.
When the comparison is performed, the first message queue message may also be screened and queried, so that the message attributes of the first message queue message participating in the comparison are the same as the message attributes of the target query message, such as message type and message field type, which is convenient for comparison.
From the above, in response to the operation of subscribing to the target topic for the data management platform, the embodiment of the present invention may set the target topic as the topic subscribed to by the data management platform, wherein, the producer of the target topic is the client of the test version, acquires the first message queue message generated by the client history of the applied version, guides the first message queue message into the client of the test version for flow replay, triggers the client to generate the second message queue message, writing the second message queue message into the message alignment of the corresponding topic, reading the second message queue message from the message queue corresponding to the subscribed target topic, screening the second message queue message under the target topic to obtain the queriable message, acquiring a preset message query condition, and querying the queriable message from the queriable message based on the message query condition to obtain the target query message; in the embodiment of the invention, the client side of the test version can be triggered to generate the second message queue message by carrying out flow playback on the first message queue message, the second message queue message corresponding to the target topic is automatically collected by subscribing the target topic, and the second message queue message under the target topic is further screened and inquired to obtain the target inquiry message required by the tester.
In order to better implement the method, correspondingly, the embodiment of the invention also provides a message query device.
Referring to fig. 3, the apparatus may include:
the topic setting unit 301 may be configured to set, in response to an operation of subscribing to a target topic for the data management platform, the target topic as a topic subscribed by the data management platform, where a producer of the target topic is a client of the test version;
a message obtaining unit 302, configured to obtain a first message queue message generated by a client history of an applied version;
the traffic playback unit 303 may be configured to introduce the first message queue message into a client of the test version for traffic playback, and trigger the client to write the second message queue message into a message alignment of the corresponding topic after generating the second message queue message;
a message reading unit 304, configured to read a second message queue message from a message queue corresponding to the subscribed target topic;
the message screening unit 305 may be configured to screen a second message queue message under the target topic to obtain an queriable message;
the message querying unit 306 may be configured to obtain a preset message querying condition, and query the queriable message to obtain a target query message based on the message querying condition.
In some optional embodiments, the message screening unit 305 may be configured to parse the second message queue messages under the target topic to obtain the message type of each second message queue message and at least one message parameter of each second message queue message;
determining a message filtering condition corresponding to the message type according to the message type of the second message queue message, wherein the message filtering condition at least comprises a message filtering parameter;
and filtering the messages in each second message queue based on the message filtering parameters and the message parameters to obtain the queryable messages.
In some optional embodiments, the message parameter may include a message field type of the second message queue message and a field value of the message field type, and the message filtering parameter may include a filtering field type and a filtering field value of the filtering field type;
a message screening unit 305, configured to perform field filtering on the second message queue message based on the filtering field type in the message filtering parameter and the message field type in the message parameter, and take the second message queue message whose message field type does not match the filtering field type as a queriable message;
and for the second message queue message with the message field type matched with the filtering field type, carrying out field value filtering based on the field value and the filtering field value, and taking the second message queue message with the field value not matched with the filtering field value as a queriable message.
In some optional embodiments, the message parameter may include a message field type of the second message queue message and a field value of the message field type, and the message query unit 306 may be configured to obtain a message query condition preset by the user, where the message query condition may include a query field type and a query field value;
performing field query on the queryable message based on the query field type and the message field type, and taking the queryable message matched with the query field type and the message field type as a candidate query message;
and performing field value query on the candidate query messages based on the field values and the query field values, and taking the candidate query messages with the field values matched with the query field values as target query messages.
In some optional embodiments, as shown in fig. 4, the message query apparatus provided in the embodiment of the present invention may further include a query condition determining unit 307, which may be configured to display a query condition setting page in the data management platform, where the query condition setting page may include at least a condition setting control;
and determining a message query condition in response to the condition input operation of the user for the condition setting control.
In some optional embodiments, the message query apparatus provided in the embodiment of the present invention may further include a message comparison unit 308, which is configured to obtain a first message queue message corresponding to the target topic;
comparing message fields based on a first message queue message corresponding to the target topic and the target query message to obtain a message comparison result;
and viewing a page on a result viewing page of the data management platform, and displaying a message comparison result.
In some optional embodiments, the message obtaining unit may be configured to record, in a use process of a client to which a version is applied, sending association information that the client generates and sends a first message queue message to a message queue under each topic;
subscribing topics corresponding to a first message queue message generated by a client according to the sending association information;
and reading a first message queue message from a message queue corresponding to the subscribed topic.
As can be seen from the above, the message query device can respond to the operation of subscribing the target topic for the data management platform, set the target topic as the topic subscribed by the data management platform, wherein, the producer of the target topic is the client of the test version, acquires the first message queue message generated by the client history of the applied version, guides the first message queue message into the client of the test version for flow replay, triggers the client to generate the second message queue message, writing the second message queue message into the message queue corresponding to the topic, reading the second message queue message from the message queue corresponding to the subscribed target topic, screening the second message queue message under the target topic to obtain an inquireable message, acquiring a preset message inquiry condition, and inquiring the inquireable message based on the message inquiry condition to obtain the target inquiry message; in the embodiment of the invention, the client side of the test version can be triggered to generate the second message queue message by carrying out flow playback on the first message queue message, the second message queue message corresponding to the target topic is automatically collected by subscribing the target topic, and the second message queue message under the target topic is further screened and inquired to obtain the target inquiry message required by the tester.
In addition, an embodiment of the present invention further provides an electronic device, where the electronic device may be a terminal or a server, and as shown in fig. 5, a schematic structural diagram of the electronic device according to the embodiment of the present invention is shown, specifically:
the electronic device may include Radio Frequency (RF) circuitry 501, memory 502 including one or more computer-readable storage media, input unit 503, display unit 504, sensor 505, audio circuitry 506, Wireless Fidelity (WiFi) module 507, processor 508 including one or more processing cores, and power supply 509. Those skilled in the art will appreciate that the electronic device configuration shown in fig. 5 does not constitute a limitation of the electronic device and may include more or fewer components than those shown, or some components may be combined, or a different arrangement of components. Wherein:
the RF circuit 501 may be used for receiving and transmitting signals during information transmission and reception or during a call, and in particular, for receiving downlink information of a base station and then sending the received downlink information to the one or more processors 508 for processing; in addition, data relating to uplink is transmitted to the base station. In general, RF circuitry 501 includes, but is not limited to, an antenna, at least one Amplifier, a tuner, one or more oscillators, a Subscriber Identity Module (SIM) card, a transceiver, a coupler, a Low Noise Amplifier (LNA), a duplexer, and the like. In addition, the RF circuitry 501 may also communicate with networks and other devices via wireless communications. The wireless communication may use any communication standard or protocol, including but not limited to Global System for Mobile communications (GSM), General Packet Radio Service (GPRS), Code Division Multiple Access (CDMA), Wideband Code Division Multiple Access (WCDMA), Long Term Evolution (LTE), email, Short Messaging Service (SMS), etc.
The memory 502 may be used to store software programs and modules, and the processor 508 executes various functional applications and data processing by operating the software programs and modules stored in the memory 502. The memory 502 may mainly include a program storage area and a data storage area, wherein the program storage area may store an operating system, an application program required by at least one function (such as a sound playing function, an image playing function, etc.), and the like; the storage data area may store data (such as audio data, a phonebook, etc.) created according to the use of the electronic device, and the like. Further, the memory 502 may include high speed random access memory, and may also include non-volatile memory, such as at least one magnetic disk storage device, flash memory device, or other volatile solid state storage device. Accordingly, the memory 502 may also include a memory controller to provide the processor 508 and the input unit 503 access to the memory 502.
The input unit 503 may be used to receive input numeric or character information and generate keyboard, mouse, joystick, optical or trackball signal inputs related to user settings and function control. In particular, in one particular embodiment, the input unit 503 may include a touch-sensitive surface as well as other input devices. The touch-sensitive surface, also referred to as a touch display screen or a touch pad, may collect touch operations by a user (e.g., operations by a user on or near the touch-sensitive surface using a finger, a stylus, or any other suitable object or attachment) thereon or nearby, and drive the corresponding connection device according to a predetermined program. Alternatively, the touch sensitive surface may comprise two parts, a touch detection means and a touch controller. The touch detection device detects the touch direction of a user, detects a signal brought by touch operation and transmits the signal to the touch controller; the touch controller receives touch information from the touch sensing device, converts the touch information into touch point coordinates, sends the touch point coordinates to the processor 508, and can receive and execute commands sent by the processor 508. In addition, touch sensitive surfaces may be implemented using various types of resistive, capacitive, infrared, and surface acoustic waves. The input unit 503 may include other input devices in addition to the touch-sensitive surface. In particular, other input devices may include, but are not limited to, one or more of a physical keyboard, function keys (such as volume control keys, switch keys, etc.), a trackball, a mouse, a joystick, and the like.
The display unit 504 may be used to display information input by or provided to a user and various graphical user interfaces of the electronic device, which may be made up of graphics, text, icons, video, and any combination thereof. The Display unit 504 may include a Display panel, and optionally, the Display panel may be configured in the form of a Liquid Crystal Display (LCD), an Organic Light-Emitting Diode (OLED), or the like. Further, the touch-sensitive surface may overlay the display panel, and when a touch operation is detected on or near the touch-sensitive surface, the touch operation is transmitted to the processor 508 to determine the type of touch event, and then the processor 508 provides a corresponding visual output on the display panel according to the type of touch event. Although in FIG. 5 the touch-sensitive surface and the display panel are two separate components to implement input and output functions, in some embodiments the touch-sensitive surface may be integrated with the display panel to implement input and output functions.
The electronic device may also include at least one sensor 505, such as light sensors, motion sensors, and other sensors. Specifically, the light sensor may include an ambient light sensor that adjusts the brightness of the display panel according to the brightness of ambient light, and a proximity sensor that turns off the display panel and/or the backlight when the electronic device is moved to the ear. As one of the motion sensors, the gravity acceleration sensor can detect the magnitude of acceleration in each direction (generally, three axes), can detect the magnitude and direction of gravity when the mobile phone is stationary, and can be used for applications of recognizing the posture of the mobile phone (such as horizontal and vertical screen switching, related games, magnetometer posture calibration), vibration recognition related functions (such as pedometer and tapping), and the like; as for other sensors such as a gyroscope, a barometer, a hygrometer, a thermometer, and an infrared sensor, which may be further configured, the description thereof is omitted here.
Audio circuitry 506, a speaker, and a microphone may provide an audio interface between the user and the electronic device. The audio circuit 506 may transmit the electrical signal converted from the received audio data to a speaker, and convert the electrical signal into a sound signal for output; on the other hand, the microphone converts the collected sound signal into an electrical signal, which is received by the audio circuit 506 and converted into audio data, which is then processed by the audio data output processor 508 and then sent to, for example, another electronic device via the RF circuit 501, or the audio data is output to the memory 502 for further processing. The audio circuit 506 may also include an earbud jack to provide communication of a peripheral headset with the electronic device.
WiFi belongs to short-distance wireless transmission technology, and the electronic equipment can help a user to receive and send emails, browse webpages, access streaming media and the like through the WiFi module 507, and provides wireless broadband internet access for the user. Although fig. 5 shows the WiFi module 507, it is understood that it does not belong to the essential constitution of the electronic device, and may be omitted entirely as needed within the scope not changing the essence of the invention.
The processor 508 is a control center of the electronic device, connects various parts of the entire cellular phone using various interfaces and lines, performs various functions of the electronic device and processes data by operating or executing software programs and/or modules stored in the memory 502 and calling data stored in the memory 502. Optionally, processor 508 may include one or more processing cores; preferably, the processor 508 may integrate an application processor, which primarily handles operating systems, user interfaces, application programs, etc., and a modem processor, which primarily handles wireless communications. It will be appreciated that the modem processor described above may not be integrated into the processor 508.
The electronic device also includes a power supply 509 (e.g., a battery) for powering the various components, which may preferably be logically coupled to the processor 508 via a power management system to manage charging, discharging, and power consumption management functions via the power management system. The power supply 509 may also include any component such as one or more dc or ac power sources, recharging systems, power failure detection circuitry, power converters or inverters, power status indicators, and the like.
Although not shown, the electronic device may further include a camera, a bluetooth module, and the like, which are not described in detail herein. Specifically, in this embodiment, the processor 508 in the electronic device loads the executable file corresponding to the process of one or more application programs into the memory 502 according to the following instructions, and the processor 508 runs the application programs stored in the memory 502, so as to implement various functions as follows:
responding to the operation of subscribing the target topic for the data management platform, and setting the target topic as the topic subscribed by the data management platform, wherein a producer of the target topic is a client of the test version;
acquiring a first message queue message generated by the history of the client with the applied version;
importing the first message queue message into a client side of a test version for flow playback, and writing the second message queue message into a message alignment column of a corresponding topic after triggering the client side to generate the second message queue message;
reading a second message queue message from a message queue corresponding to the subscribed target topic;
screening second message queue messages under the target topic to obtain queryable messages;
and acquiring a preset message query condition, and querying the queryable message to obtain the target query message based on the message query condition.
It will be understood by those skilled in the art that all or part of the steps of the methods of the above embodiments may be performed by instructions or by associated hardware controlled by the instructions, which may be stored in a computer readable storage medium and loaded and executed by a processor.
To this end, the embodiment of the present invention provides a computer-readable storage medium, in which a plurality of instructions are stored, and the instructions can be loaded by a processor to execute the steps in any one of the message query methods provided by the embodiment of the present invention. For example, the instructions may perform the steps of:
responding to the operation of subscribing the target topic for the data management platform, and setting the target topic as the topic subscribed by the data management platform, wherein a producer of the target topic is a client of the test version;
acquiring a first message queue message generated by the history of the client with the applied version;
importing the first message queue message into a client of a test version for flow playback, and after triggering the client to generate a second message queue message, writing the second message queue message into a message pair column of a corresponding topic;
reading a second message queue message from a message queue corresponding to the subscribed target topic;
screening second message queue messages under the target topic to obtain queryable messages;
and acquiring a preset message query condition, and querying the queryable message to obtain the target query message based on the message query condition.
The above operations can be implemented in the foregoing embodiments, and are not described in detail herein.
Wherein the computer-readable storage medium may include: read Only Memory (ROM), Random Access Memory (RAM), magnetic or optical disks, and the like.
Since the instructions stored in the computer-readable storage medium can execute the steps in any message query method provided in the embodiments of the present invention, the beneficial effects that can be achieved by any message query method provided in the embodiments of the present invention can be achieved, which are detailed in the foregoing embodiments and will not be described herein again.
According to an aspect of the application, there is also provided a computer program product or a computer program comprising computer instructions stored in a computer readable storage medium. The processor of the electronic device reads the computer instructions from the computer-readable storage medium, and the processor executes the computer instructions, so that the electronic device executes the method provided in the various alternative implementations in the above embodiments.
The message query method, apparatus, electronic device and storage medium provided in the embodiments of the present invention are described in detail above, and specific embodiments are applied in this document to explain the principles and embodiments of the present invention, and the description of the above embodiments is only used to help understanding the method and its core idea of the present invention; meanwhile, for those skilled in the art, according to the idea of the present invention, there may be variations in the specific embodiments and the application scope, and in summary, the content of the present specification should not be construed as a limitation to the present invention.

Claims (10)

1. A message query method is applied to a data management platform, and comprises the following steps:
responding to the operation of subscribing a target topic for the data management platform, and setting the target topic as the topic subscribed by the data management platform, wherein a producer of the target topic is a client of a test version;
acquiring a first message queue message generated by the client history of the applied version;
importing the first message queue message into the client side of the test version for flow playback, and after a second message queue message is generated by a trigger client side, writing the second message queue message into a message alignment of a corresponding topic;
reading a second message queue message from a message queue corresponding to the subscribed target topic;
screening the second message queue message under the target topic to obtain an inquireable message;
and acquiring a preset message query condition, and querying the queriable message to obtain a target query message based on the message query condition.
2. The message query method of claim 1, wherein the screening the second message queue message under the target topic to obtain a queryable message comprises:
analyzing the second message queue messages under the target topic to obtain the message type of each second message queue message and at least one message parameter of each second message queue message;
determining a message filtering condition corresponding to the message type according to the message type of the second message queue message, wherein the message filtering condition at least comprises a message filtering parameter;
and filtering each second message queue message based on the message filtering parameters and each message parameter to obtain the queryable message.
3. The message query method of claim 2, wherein the message parameter comprises a message field type of the second message queue message and a field value of the message field type, and the message filtering parameter comprises a filtering field type and a filtering field value of the filtering field type;
filtering each of the second message queue messages based on the message filtering parameters and each of the message parameters to obtain queriable messages, comprising:
performing field filtering on the second message queue message based on a filtering field type in the message filtering parameters and a message field type in the message parameters, and taking the second message queue message of which the message field type is not matched with the filtering field type as a queriable message;
and for a second message queue message with a message field type matched with the filtering field type, carrying out field value filtering based on the field value and the filtering field value, and taking the second message queue message with the field value not matched with the filtering field value as a queriable message.
4. The message query method of claim 2, wherein the message parameters include a message field type of the second message queue message and a field value of the message field type, and the obtaining of the preset message query condition is configured to query the queriable message to obtain the target query message based on the message query condition, and comprises:
acquiring a preset message query condition, wherein the message query condition comprises a query field type and a query field value;
performing field query on the queryable message based on the query field type and the message field type, and taking the queryable message matched with the query field type and the message field type as a candidate query message;
and for the candidate query message, performing field value query based on the field value and the query field value, and taking the candidate query message with the field value matched with the query field value as a target query message.
5. The message query method according to claim 4, before the obtaining the message query condition preset by the user, further comprising:
displaying a query condition setting page in the data management platform, wherein the query condition setting page at least comprises a condition setting control;
and determining a message query condition in response to a condition input operation of the user for the condition setting control.
6. The message query method of claim 1, wherein the method further comprises:
acquiring a first message queue message corresponding to the target topic;
comparing message fields of a first message queue message corresponding to the target topic with the target query message to obtain a message comparison result;
and displaying the message comparison result on a result viewing page of the data management platform.
7. The message query method of claim 1, wherein the obtaining the first message queue message generated by the client history of the applied version comprises:
recording sending association information of a first message queue message generated by a client and sent to a message queue under each topic in the using process of the client with an applied version;
according to the sending correlation information, subscribing the topic corresponding to the first message queue message generated by the client;
reading the first message queue message from a message queue corresponding to the topic of the subscription.
8. A message query device, comprising:
the topic setting unit is used for responding to the operation of subscribing a target topic for the data management platform and setting the target topic as the topic subscribed by the data management platform, wherein a producer of the target topic is a client of a test version;
the message acquisition unit is used for acquiring a first message queue message generated by the client history of the applied version;
the flow playback unit is used for importing the first message queue message into the client of the test version for flow playback, and triggering the client to write a second message queue message into a message pair column of a corresponding topic after the second message queue message is generated;
the message reading unit is used for reading a second message queue message from a message queue corresponding to the subscribed target topic;
the message screening unit is used for screening the second message queue message under the target topic to obtain an inquireable message;
and the message query unit is used for acquiring preset message query conditions and querying the queriable messages to obtain target query messages based on the message query conditions.
9. An electronic device comprising a memory and a processor; the memory stores an application program, and the processor is configured to execute the application program in the memory to perform the steps of the message query method according to any one of claims 1 to 7.
10. A computer readable storage medium storing instructions adapted to be loaded by a processor to perform the steps of the message query method according to any one of claims 1 to 7.
CN202210753983.0A 2022-06-28 2022-06-28 Message query method, device, electronic equipment and storage medium Pending CN115098383A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202210753983.0A CN115098383A (en) 2022-06-28 2022-06-28 Message query method, device, electronic equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202210753983.0A CN115098383A (en) 2022-06-28 2022-06-28 Message query method, device, electronic equipment and storage medium

Publications (1)

Publication Number Publication Date
CN115098383A true CN115098383A (en) 2022-09-23

Family

ID=83294657

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202210753983.0A Pending CN115098383A (en) 2022-06-28 2022-06-28 Message query method, device, electronic equipment and storage medium

Country Status (1)

Country Link
CN (1) CN115098383A (en)

Similar Documents

Publication Publication Date Title
CN108959000B (en) Server pressure testing method, system and terminal
CN104852885B (en) Method, device and system for verifying verification code
CN107368518B (en) Notification message management method, terminal and computer readable storage medium
CN107204964B (en) Authority management method, device and system
CN108156508B (en) Barrage information processing method and device, mobile terminal, server and system
CN106371964B (en) Method and device for prompting message
CN110020293B (en) Multimedia data display method, device and storage medium
CN108810057B (en) User behavior data acquisition method and device and storage medium
CN108270757B (en) User account switching method, device, client and system
CN105227598B (en) Resource sharing method, device and system based on cloud storage
JP6915074B2 (en) Message notification method and terminal
CN112749074B (en) Test case recommending method and device
CN107766351B (en) File directory identification method and device
CN110781390A (en) Information recommendation method and mobile terminal
CN108269223B (en) Webpage graph drawing method and terminal
CN106657281B (en) File sharing method and device
CN114510417A (en) Image rendering effect testing method and device, electronic equipment and storage medium
CN113852450A (en) Message push feedback method and device, electronic equipment and storage medium
CN109799994B (en) Terminal component generation method and device
JP2019511142A (en) Information display method, apparatus and system
CN109240986B (en) Log processing method and device and storage medium
CN115098383A (en) Message query method, device, electronic equipment and storage medium
CN110209924B (en) Recommendation parameter acquisition method, device, server and storage medium
CN107346347B (en) Webpage table display method and device
CN108616552B (en) Webpage access method, device and system

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination