Order information processing method, order information obtaining method, order information processing device, order information obtaining device, medium, equipment and product
By asynchronously writing to message queues and message consumers to process promotion order record information, the problems of incomplete records and process stability are solved, and complete record storage and efficient problem troubleshooting are achieved.
Patent Information
- Application Number
- CN202510813516.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-06-17
- Publication Date
- 2025-09-19
AI Technical Summary
When processing promotion order record information in the existing technology, incomplete records and synchronous writing to the database will affect the stability of the order processing process and lead to low efficiency in troubleshooting.
By using the asynchronous writing method to the message queue, the complete order record information is obtained through the message consumer and written into the database to ensure the integrity of the record. At the same time, the independent processing process does not affect event processing.
It ensures the integrity of the promotion order record information stored in the database, and improves the stability of the order processing link and the efficiency of problem troubleshooting.
Smart Images

Figure CN120672427A_ABST
Abstract
Description
Technical Field
[0001] The present disclosure relates to the field of data processing technology, and in particular, to an order information processing method, acquisition method, device, medium, equipment and product. Background Art
[0002] With the development of the internet, online promotion has become a new avenue for content marketing. For example, short videos can be used for product promotion and news push. For example, a short video might be a promotional video in which the promoter introduces the product. To improve the effectiveness of the promotion, the promoter can place a promotion order for that short video. This order can be used to promote the short video, ensuring it reaches more users. Recording promotion order information is crucial for querying and troubleshooting promotion order issues. Summary of the Invention
[0003] This summary is provided to briefly introduce concepts that will be described in detail in the detailed description below. This summary is not intended to identify key features or essential features of the claimed technical solution, nor is it intended to limit the scope of the claimed technical solution.
[0004] In a first aspect, the present disclosure provides a method for processing order information, the method comprising: Obtaining first order record information related to a promotion order, wherein the promotion order is used to promote the promotion content; Asynchronously writing the first order record information into a message queue; The target order record information is obtained according to the first order record information through the message consumer corresponding to the message queue, and the target order record information is written into the first database, wherein the target order record information includes the first order record information.
[0005] In a second aspect, the present disclosure provides a method for obtaining order information, the method comprising: In response to receiving a query instruction for a promotion order, target order record information related to the promotion order is obtained from a first database, where the target order record information is obtained by the order information processing method provided by the first aspect of the present disclosure.
[0006] In a third aspect, the present disclosure provides an order information processing device, the device comprising: A first acquisition module is used to acquire first order record information related to a promotion order, wherein the promotion order is used to promote the promotion content; an asynchronous writing module, configured to asynchronously write the first order record information into a message queue; A database writing module is used to obtain target order record information according to the first order record information through the message consumer corresponding to the message queue, and write the target order record information into the first database, wherein the target order record information includes the first order record information.
[0007] In a fourth aspect, the present disclosure provides an order information acquisition device, the device comprising: The second acquisition module is configured to, in response to receiving a query instruction for a promotion order, acquire target order record information related to the promotion order from the first database, wherein the target order record information is obtained by the order information processing method provided by the first aspect of the present disclosure.
[0008] In a fifth aspect, the present disclosure provides a computer-readable medium having a computer program stored thereon, which, when executed by a processing device, implements the steps of the order information processing method provided in the first aspect of the present disclosure, or, when executed by a processing device, implements the steps of the order information acquisition method provided in the second aspect of the present disclosure.
[0009] In a sixth aspect, the present disclosure provides an electronic device, including: a storage device having a computer program stored thereon; A processing device is used to execute the computer program in the storage device to implement the steps of the order information processing method provided in the first aspect of the present disclosure, or to implement the steps of the order information acquisition method provided in the second aspect of the present disclosure.
[0010] In the seventh aspect, the present disclosure provides a computer program product, including a computer program, which, when executed by a processor, implements the steps of the order information processing method provided in the first aspect of the present disclosure, or, when executed by a processor, implements the steps of the order information acquisition method provided in the second aspect of the present disclosure.
[0011] Through the above technical solution, first order record information related to a promotional order is obtained and asynchronously written to a message queue. The target order record information is then obtained based on the first order record information through a message consumer corresponding to the message queue, and the target order record information is written to the first database. In this way, if the first order record information is incomplete, the message consumer can obtain this information to obtain the complete target order record information, thereby ensuring that the promotional order record information stored in the first database is complete. Furthermore, the message consumer can be a separate service or process. Processing the order record information through the message consumer does not affect the normal order processing flow, thereby ensuring the stability of the order processing chain.
[0012] Other features and advantages of the present disclosure will be described in detail in the following detailed description. BRIEF DESCRIPTION OF THE DRAWINGS
[0013] The above and other features, advantages and aspects of the various embodiments of the present disclosure will become more apparent with reference to the following detailed description in conjunction with the accompanying drawings. Throughout the drawings, the same or similar reference numerals represent the same or similar elements. It should be understood that the drawings are schematic and that the originals and elements are not necessarily drawn to scale. In the drawings: Figure 1 It is a schematic diagram showing an implementation environment according to an exemplary embodiment.
[0014] Figure 2 The figure is a flowchart of a method for processing order information according to an exemplary embodiment.
[0015] Figure 3 It is a schematic diagram showing a method for processing order information according to an exemplary embodiment.
[0016] Figure 4 The figure is a flowchart of a method for obtaining order information according to an exemplary embodiment.
[0017] Figure 5 The figure is a block diagram of an order information processing device according to an exemplary embodiment.
[0018] Figure 6 The figure is a block diagram of a device for acquiring order information according to an exemplary embodiment.
[0019] Figure 7 A schematic structural diagram of an electronic device suitable for implementing the embodiments of the present disclosure is shown. DETAILED DESCRIPTION
[0020] The following describes embodiments of the present disclosure in more detail with reference to the accompanying drawings. Although certain embodiments of the present disclosure are shown in the accompanying drawings, it should be understood that the present disclosure can be implemented in various forms and should not be construed as limited to the embodiments described herein. Rather, these embodiments are provided to provide a more thorough and complete understanding of the present disclosure. It should be understood that the drawings and embodiments of the present disclosure are for illustrative purposes only and are not intended to limit the scope of protection of the present disclosure.
[0021] It should be understood that the various steps described in the method embodiments of the present disclosure may be performed in different orders and / or in parallel. In addition, the method embodiments may include additional steps and / or omit the steps shown. The scope of the present disclosure is not limited in this respect.
[0022] As used herein, the term "including" and its variations are open-ended, i.e., "including but not limited to." The term "based on" means "based, at least in part, on." The term "one embodiment" means "at least one embodiment," the term "another embodiment" means "at least one additional embodiment," and the term "some embodiments" means "at least some embodiments." Other terms are defined in the following description.
[0023] It should be noted that the concepts of "first" and "second" mentioned in this disclosure are only used to distinguish different devices, modules or units, and are not used to limit the order or interdependence of the functions performed by these devices, modules or units.
[0024] It should be noted that the modifications of "one" and "multiple" mentioned in the present disclosure are illustrative rather than restrictive, and those skilled in the art should understand that unless otherwise clearly indicated in the context, they should be understood as "one or more".
[0025] The names of the messages or information exchanged between multiple devices in the embodiments of the present disclosure are only used for illustrative purposes and are not used to limit the scope of these messages or information.
[0026] It is understandable that before using the technical solutions disclosed in the various embodiments of this disclosure, the type, scope of use, usage scenarios, etc. of the personal information involved in this disclosure should be informed to the user and the user's authorization should be obtained in an appropriate manner in accordance with relevant laws and regulations.
[0027] For example, in response to a user's active request, a prompt message is sent to the user to clearly inform the user that the operation requested will require the acquisition and use of the user's personal information. This allows the user to independently choose whether to provide personal information to the electronic device, application, server, storage medium, or other software or hardware that performs the operations of the disclosed technical solution based on the prompt message.
[0028] As an optional but non-limiting implementation, in response to receiving a user's active request, the prompt information may be sent to the user in the form of a pop-up window, in which the prompt information may be presented in text form. Furthermore, the pop-up window may also contain a selection control for the user to select "agree" or "disagree" to provide personal information to the electronic device.
[0029] It is understandable that the above notification and user authorization process are merely illustrative and do not limit the implementation of the present disclosure. Other methods that comply with relevant laws and regulations may also be applied to the implementation of the present disclosure.
[0030] At the same time, it is understood that the data involved in this technical solution (including but not limited to the data itself, the acquisition or use of the data) shall comply with the requirements of relevant laws, regulations and relevant provisions.
[0031] First, the implementation environment of the present disclosure is introduced. Figure 1 is a schematic diagram showing an implementation environment according to an exemplary embodiment, such as Figure 1 As shown, the implementation environment may include an electronic device 11, an electronic device 12, a first database 13, and an electronic device 14. The electronic device 11 is, for example, a mobile phone, and a user can place a promotional order for promotional content through the electronic device 11. The electronic device 12 is, for example, a server, which can be used to process order record information of promotional orders. The first database 13 can be used to store order record information. The first database 13 can be integrated into the electronic device 12, or the first database 13 can be set in an electronic device other than the electronic device 12. The electronic device 14 is, for example, a terminal device, which can be used to query and display order record information of promotional orders. The electronic device 14 can be a device used by the customer service of the promotion platform. Figure 1 The forms of the electronic device 11 , the electronic device 12 , and the electronic device 14 shown are merely exemplary. For example, the electronic device 11 may also be a personal computer, a tablet computer, etc.
[0032] The following is an introduction to the order information processing method disclosed in the present invention.
[0033] Figure 2 This is a flowchart of an order information processing method according to an exemplary embodiment. The order information processing method can be applied to Figure 1 The electronic device 12 shown, such as Figure 2 As shown, the order information processing method may include steps 21 to 23.
[0034] In step 21, first order record information related to the promotion order is obtained.
[0035] Promotional orders are used to promote promotional content. Promotional content can be in the form of video, audio, images, text, live broadcasts, etc. Promotional content may contain advertisements, such as for product promotion and news push.
[0036] If the user wants to improve the promotion effect, the user can first initiate a promotion request through the electronic device 11 and select parameters such as promotion content, promotion mode, investment amount, and investment duration, and then place a promotion order for the promotion content through the electronic device 11. A promotion order can be used to promote one promotion content or to promote multiple promotion contents. Taking the promotion content as a short video as an example, a promotion order can be used to heat up a short video, that is, to increase the exposure of this short video. A promotion order can also be used to heat up multiple short videos, that is, to increase the exposure of these multiple short videos at the same time. After the user places an order, the electronic device 12 can receive the order request and create a promotion order.
[0037] From the creation of a promotion order to its completion, multiple events may be included, such as order placement, review, order renewal, discontinuation of promotion, and order completion. Order records related to promotion orders may include records corresponding to multiple events, and the records corresponding to each event are used to record the event.
[0038] Among them, the code returned by the interface called by the service for executing the event may include the record information corresponding to the event. For example, if the order fails, the code returned by the interface called by the service for executing the order event may include the following information: the time when the order failed, the identification information of the orderer of the promotion order, the reason for the order failure sent to the user, the reason for the order failure recorded in the code, the parameters of the promotion order, etc. Among them, the reason for the order failure sent to the user is the information sent to the electronic device 11, that is, the reason for the order failure seen by the user. The reason for the order failure recorded in the code is the reason for the order failure recorded by the system through the code. The parameters of the promotion order may include parameters such as the delivery time selected by the user when placing the order. The electronic device 12 can obtain the first order record information from the code returned by the interface.
[0039] In step 22, the first order record information is asynchronously written into the message queue.
[0040] In step 23, the target order record information is obtained according to the first order record information through the message consumer corresponding to the message queue, and the target order record information is written into the first database, wherein the target order record information includes the first order record information.
[0041] In the present disclosure, the electronic device 12 can asynchronously write the first order record information into a message queue (MQ, MessageQueue). The message consumer (MQ Consumer) corresponding to the message queue can be in the form of a service or process, etc. The message consumer can obtain and parse the first order record information from the message queue, and the message consumer can have functions such as querying the database and calling methods to perform information processing.
[0042] This allows, on the one hand, for incomplete information about the first order record—for example, if it lacks the identifying information of the creator of the promotional content—to be retrieved through the message queue's corresponding message consumer (MQ Consumer), thereby obtaining the complete target order record. Furthermore, asynchronous writing to the message queue allows the event-executing service to continue processing the event without waiting for a response message. Furthermore, the message consumer is a separate service or process from the event-executing service, allowing information processing by the message consumer to proceed without affecting the event processing flow.
[0043] However, if the first order record information is synchronously written into the first database, although there is no need to increase the message consumer service, the first order record information may be incomplete, and the order record information stored in the first database is incomplete. Moreover, the synchronous reporting method requires waiting for the response message from the recipient, and subsequent processing will only be performed after receiving the confirmation message. In the case of response message blocking and information reporting taking a long time, the subsequent processing flow of the event will be affected, thereby affecting the stability of order event processing.
[0044] Through the above technical solution, first order record information related to a promotional order is obtained and asynchronously written to a message queue. The target order record information is then obtained based on the first order record information through a message consumer corresponding to the message queue, and the target order record information is written to the first database. In this way, if the first order record information is incomplete, the message consumer can obtain this information to obtain the complete target order record information, thereby ensuring that the promotional order record information stored in the first database is complete. Furthermore, the message consumer can be a separate service or process. Processing the order record information through the message consumer does not affect the normal order processing flow, thereby ensuring the stability of the order processing chain.
[0045] In the present disclosure, the implementation of step 23 may be: If the first order record information does not include information of the specified field, the information of the specified field is obtained through the message consumer.
[0046] The information in the designated fields may be information that is pre-set to be included in the order record information. As described above, the first order record information obtained from the code returned by the interface called by the service for executing the event may be incomplete. If the first order record information does not contain information in the designated fields, in this disclosure, in order to ensure the integrity of the target order record information written to the first database, the information in the designated fields may be obtained through the message consumer. The target order record information then includes the first order record information and the information in the designated fields, thereby ensuring that the target order record information written to the first database is complete.
[0047] In one embodiment, obtaining information of a specified field through a message consumer may include: Through the message consumer, the second database is queried according to the information included in the first order record information to obtain information of the specified field.
[0048] The second database stores information about the specified fields. The second database and the first database 13 may be the same database or different databases. Information about the specified fields may be stored in a business data table related to promotional orders. The business data table is stored in the second database. Message consumers can query the second database based on the information contained in the first order record to obtain information about the specified fields.
[0049] In this way, the integrity of the target order record information written into the first database can be guaranteed. Moreover, since the message consumer is a service or process different from the service used to execute the event, database queries and information processing operations are performed through the message consumer without affecting the processing flow of the event itself.
[0050] In the present disclosure, considering that if corresponding event record information is generated for all events related to promotional orders, it may lead to excessive consumption of processing resources and storage resources, therefore, in one embodiment, the target order record information may include target event record information for specified events of the promotional order.
[0051] Among them, there can be many events related to promotion orders, and some key events can be used as designated events. The designated events include, for example: order events, order payment callback events, promotion plan creation events, order review events, review approval events, review rejection events, start delivery events, renewal events, stop delivery events, and order completion events. When a problem occurs with a promotion order, for example, a user reports to the customer service of the promotion platform that the order failed or the renewal was unsuccessful, the target event record information of the designated event can be used to troubleshoot problems with the promotion order. In the present disclosure, a code for obtaining the first event record information and a code for writing the first event record information into the message queue can be added to the code for executing the designated event, so that when the designated event is triggered, the first event record information can be obtained and written.
[0052] The target event record information of a specified event may include at least one of the following: Identification information of the specified event; event name of the specified event; time when the specified event occurs; information on the triggering method of the specified event; identification information of the initiator of the specified event; information used to indicate the event dimension of the specified event; identification information corresponding to the event dimension; identification information of the promotional order; identification information of the creator of the promotional content; identification information of the person who placed the promotional order; identification information of the promotional content; information used to indicate the preset operation corresponding to the specified event; result information used to indicate whether the preset operation is successful; processing time of the specified event; identification information of the log corresponding to the first request; information on the service used to execute the specified event; information on the upstream service of the service used to execute the specified event; the first request is a processing request for the promotional order and is related to the specified event.
[0053] The identifier of the specified event is used to uniquely identify the specified event and can be represented as event_id, with a data type of int. If the same specified event occurs in a promotional order, it will also correspond to different event_ids. For example, if a promotional order has two renewal events, these two renewal events are considered two events, and the event_id of the first renewal event is different from the event_id of the second renewal event.
[0054] Specifies the event name, which can be expressed as event_name. It is used to indicate what event occurred and has a string data type. For example, the event name is Stop Delivery.
[0055] The time when a specified event occurs can be represented as event_time, with a data type of datetime and can be accurate to milliseconds. For example, when a user initiates a stop delivery request through electronic device 11, the time when electronic device 12 receives the stop delivery request is used as the time when the stop delivery event occurs.
[0056] Specifies the triggering method for the event, represented as event_trigger, with a data type of int. This triggering method can be used to indicate whether the event is triggered by one of the following methods: timer, remote procedure call (RPC), or asynchronous triggering. For example, if the delivery duration of a promotion order reaches the set delivery duration (e.g., 24 hours), the order will automatically stop delivery. The stop delivery event can be triggered by a timer.
[0057] The identification information of the promotional content can be represented as creative_id, and the data type is, for example, int. For example, if the promotional content is a short video, the identification information can be represented as the short video's item_id; if the promotional content is a live broadcast room, the identification information can be represented as the live broadcast room's room_id.
[0058] The creator's identification information of the promoted content, data type is int. The orderer's identification information of the promotion order, data type is int. Taking the promoted content as short video 1, the creator's identification information is the creator ID of creator A of short video 1. If the orderer is creator A, the orderer's identification information is the same as the creator's identification information. If the orderer is not creator A, for example, the orderer is an advertiser, the orderer's identification information is the user ID of the orderer.
[0059] Specifies the identification information of the initiator of the event, which can be represented as event_operator and has a data type of, for example, int. For example, in the case of a renewal event, if the orderer renews their order, the initiator's identification information is the orderer's user ID. If the event is automatically initiated by the system, such as when an order is automatically stopped, the initiator's identification information can be a preset ID. The corresponding identification information can be determined based on the orderer's and initiator's user accounts.
[0060] The information used to indicate the event dimension of the specified event can be expressed as event_dim, and the data type is int. The identification information corresponding to the event dimension can be expressed as event_dim_id, and the data type is int. Among them, event dimensions include, for example, order dimension, billing dimension, promotion plan dimension, and content dimension. If the specified event is related to order placement, the event dimension can be the order dimension, and the corresponding identification information can be the task_id of the promotion order. If the specified event is related to billing, such as a renewal event, the event dimension can be the billing dimension, and the corresponding identification information can be the bill_id of the promotion order. If the specified event is related to a promotion plan, such as an advertising plan submission event, the event dimension can be the promotion plan dimension, and the corresponding identification information can be the ad_id of the promotion order. If the specified event is related to the promotion content itself, the event dimension can be the content dimension, and the corresponding identification information can be creative_id. The event dimension of the specified event can be pre-set.
[0061] The identification information for a promotional order may include order_id, task_id, and ad_id. The order_id uniquely identifies the promotional order. The task_id and ad_id mentioned above can also be used to uniquely identify a promotional order. This means that a promotional order can be uniquely queried using order_id, task_id, or ad_id. The task_id identifies the order processing task, and the ad_id identifies the order promotion plan.
[0062] Information indicating the preset action corresponding to a specified event, expressed as action, of type string. The preset action is the action that should be performed after the specified event is triggered. For example, for a stop delivery event, the corresponding preset action is stop delivery.
[0063] The result information used to indicate whether the preset operation is successful can be represented as result, the data type is int, and for example, 0 indicates success and 1 indicates failure. Taking the renewal event as an example, if result is 0, it means the renewal is successful.
[0064] Specifies the processing duration of an event, expressed as a cost (e.g., int) in milliseconds. This represents the duration from when the event is triggered until the result indicating whether the preset operation was successful is obtained.
[0065] The identification information of the log corresponding to the first request, for example, includes the log identification information logid and the sub-log identification information sub_logid, and the data type can be string. Among them, the first request is a processing request for a promotion order and is related to a specified event. For example, the request can be triggered by the user, such as an order request, and the identification information of the log is established when the request is received, that is, one request corresponds to one logid, and one request can be associated with one or more events. For example, after receiving the order request, the order event and the review event are completed at the same time, then the identification information of the log corresponding to the order event is the same as the identification information of the log corresponding to the review event.
[0066] Information about the service used to execute the specified event may include the service name, expressed as psm, with a data type of string, and information indicating the environment where the service is located, expressed as env, with a data type of string. The service environment is used to indicate whether it is a test environment or a production environment.
[0067] Information about the upstream service of the service that executes the specified event. The upstream service is the service that calls the service that executes the specified event. The information about the upstream service may include the name of the upstream service, represented by caller_psm, with a data type of string. It may also include information indicating the environment where the upstream service is located, represented by ctx_env, with a data type of string. The environment where the upstream service is located is used to characterize whether it is a test environment or an online environment.
[0068] As an example, after a specified event is triggered, the first event record information is obtained from the code returned by the interface. The first event record information includes, for example, other information in the target event record information except the order_id and the creator's identification information, that is, the first event record information does not contain the promotion order's identification information order_id and the creator's identification information. After the first event record information is asynchronously sent to the message queue, the message consumer can query the second database based on the information contained in the first event record information to obtain the promotion order's identification information order_id and the creator's identification information. For example, if the first event record information contains task_id, the message consumer can query the order_id and the creator's identification information from the second database based on the task_id.
[0069] When an event related to a promotional order occurs, one or more SQL operations are triggered. For example, when a promotion stop event occurs, the order status in the order business table is modified through SQL operations. The SQL records of these operations can also be used to troubleshoot order issues. SQL operations can include update operations, delete operations, and more.
[0070] In the present disclosure, the target order record information includes target SQL record information of a structured query language SQL operation associated with a promotional order, and the target SQL record information includes at least one of the following: Information about the data table associated with the SQL operation; the SQL statement executed by the SQL operation; result information indicating whether the SQL operation is successful; information about the SQL transaction corresponding to the SQL operation; identification information of the log corresponding to the second request; information about the service used to execute the event; information about the upstream service of the service used to execute the event; identification information of the initiator of the event; the second request is a processing request for a promotional order and is related to the event.
[0071] The information of the data table associated with the SQL operation may include the name of the database table, represented as table_name, with a data type of string, and may also include the number of rows of the data table associated with the SQL operation, represented as rows_affected, with a data type of int.
[0072] The SQL statement executed by the SQL operation has a data type of, for example, string, and the SQL statement may include identification information of the promotion order.
[0073] The result information used to indicate whether the SQL operation is successful. The data type is int. For example, 0 indicates success and 1 indicates failure.
[0074] Information about the SQL transaction corresponding to the SQL operation. An SQL transaction is established when an SQL operation is required. The SQL transaction information may include the start and end time of the SQL transaction. The data type is datetime.
[0075] The log identification information corresponding to the second request, which is a request to process a promotional order and is related to an event. The request has been explained above. If the event is the specified event described above, the first and second requests are identical, and the corresponding log identification information is the same as the log identification information in the target event record.
[0076] The information of the service used to execute the event and the information of the upstream service of the service used to execute the event can refer to the information of the service of the above-mentioned specified event. If the event is the above-mentioned specified event, the service information is the same as the service information in the target event record information.
[0077] Among them, after the SQL operation occurs, the electronic device 12 can obtain the first SQL record information from the code returned by the interface corresponding to the SQL operation, and asynchronously write the first SQL record information into the message queue. If the first SQL record information is incomplete, the missing data can be obtained through the message consumer to obtain the target SQL record information.
[0078] SQL operations can be associated with or not associated with a specified event. That is, when a specified event is triggered, target event records for the specified event and target SQL records for the SQL operations associated with the specified event are generated. Furthermore, if other events that are not specified events occur, their event information may not be recorded. However, if other events occur that may involve SQL operations, the target SQL records corresponding to these SQL operations may also be stored.
[0079] In the present disclosure, when the SQL operation is associated with a specified event for a promotion order, the SQL record information also includes the identification information of the specified event, i.e., event_id, which can be associated with the target event record information through event_id, i.e., it can be queried which SQL operations are associated with the specified event.
[0080] In one embodiment, the SQL operation is associated with a specified event, that is, the SQL operation is an operation triggered by the specified event. Figure 3 is a schematic diagram showing a method for processing order information according to an exemplary embodiment. Figure 3 As shown, taking the designated event as an order event as an example, after the order event occurs, the first event record information and the first SQL record information related to the order event can be obtained, and the first event record information and the first SQL record information can be asynchronously written into the message queue.
[0081] It should be noted that the first SQL record information may include the first SQL record information corresponding to multiple SQL operations respectively, the first event record information and the multiple first SQL record information, which may be obtained at the same time and asynchronously written to the message queue at the same time, or may not be obtained at the same time and asynchronously written to the message queue at the same time. Afterwards, the target event record information and the target SQL record information are obtained through the message consumer, and the message consumer writes the target event record information and the target SQL record information into the first database 13. The way of writing into the first database may also be asynchronous writing. The target event record information and the target SQL record information may be written into the first database separately or simultaneously. The way of writing into the first database may be to write the target event record information as a row of records in the event record table associated with the promotion order, and to write the target SQL record information as a row of records in the SQL record table associated with the promotion order. The first database 13 may support permanent storage, and the first database 13 may be, for example, a ClickHouse database.
[0082] Through the above technical solution, the target event record information and target SQL record information related to the promotion order can be stored in the first database. When it is necessary to query the promotion order, this information can be obtained from the first database, thereby providing a basis for troubleshooting when there is a problem with the promotion order.
[0083] In related technologies, for example, when a user reports to the customer service of a promotion platform that an order has failed or the delivery effect is poor, the customer service needs to use information such as the order time and creator ID of the promotion order to troubleshoot possible problems with the promotion order in the log code related to the promotion order. However, the log code has a limited storage time, and logs that exceed the storage time cannot be obtained, so the problem may not be found. In addition, technical personnel need to call an interface to obtain the log, which reduces the efficiency of problem troubleshooting. In the present disclosure, for example, when each specified event occurs, information related to the specified event can be recorded and stored, which can provide a basis for troubleshooting problems with the promotion order.
[0084] The present disclosure also provides a method for obtaining order information. The method for obtaining order information can be applied to Figure 1 The electronic device 14 is shown. Figure 4 is a flow chart showing a method for obtaining order information according to an exemplary embodiment. Figure 4 As shown, the order information acquisition method may include step 41.
[0085] In step 41, in response to receiving a query instruction for a promotion order, target order record information related to the promotion order is obtained from the first database. The target order record information is obtained by the order information processing method provided in any of the above embodiments of the present disclosure.
[0086] Among them, the query instruction may include the identification information of the promotion order (such as any one of order_id, task_id, ad_id). According to the identification information of the promotion order, the target order record information associated with the identification information can be obtained from the first database. The target order record information may include the target event record information of all specified events that have occurred related to the promotion order, and the target SQL record information of all SQL operations performed related to the promotion order. In this way, all information on the processing link of the promotion order can be provided to the customer service who queries this information, without having to call the service interface of the executed event one by one to troubleshoot the problem from the log code, thereby improving the efficiency of problem troubleshooting.
[0087] Based on the same inventive concept, the present disclosure also provides an order information processing device, Figure 5 is a block diagram of an order information processing device according to an exemplary embodiment. Figure 5 As shown, the order information processing device 50 may include: A first acquisition module 51 is configured to acquire first order record information related to a promotion order, wherein the promotion order is used to promote the promotion content; An asynchronous writing module 52 is configured to asynchronously write the first order record information into a message queue; The database writing module 53 is used to obtain target order record information according to the first order record information through the message consumer corresponding to the message queue, and write the target order record information into the first database, wherein the target order record information includes the first order record information.
[0088] Optionally, the database writing module 53 includes: The acquisition submodule is used to obtain the information of the specified field through the message consumer if the first order record information does not contain the information of the specified field, and the target order record information includes the first order record information and the information of the specified field.
[0089] Optionally, the acquisition submodule is used to: The message consumer queries a second database based on the information included in the first order record information to obtain the information of the specified field, and the second database stores the information of the specified field.
[0090] Optionally, the target order record information includes target event record information for a specified event of the promotion order, and the target event record information includes at least one of the following: Identification information of the specified event; the event name of the specified event; the time when the specified event occurred; the triggering method information of the specified event; identification information of the initiator of the specified event; information used to indicate the event dimension of the specified event; identification information corresponding to the event dimension; identification information of the promotion order; identification information of the creator of the promotion content; identification information of the person who placed the promotion order; identification information of the promotion content; information used to indicate the preset operation corresponding to the specified event; result information used to indicate whether the preset operation is successful; processing time of the specified event; identification information of the log corresponding to the first request; information of the service used to execute the specified event; information of the upstream service of the service used to execute the specified event; the first request is a processing request for the promotion order and is related to the specified event.
[0091] Optionally, the target order record information includes target SQL record information of a structured query language SQL operation associated with the promotion order, and the target SQL record information includes at least one of the following: Information on the data table associated with the SQL operation; the SQL statement executed by the SQL operation; result information indicating whether the SQL operation is successful; information on the SQL transaction corresponding to the SQL operation; identification information of the log corresponding to the second request; information on the service used to execute the event; information on the upstream service of the service used to execute the event; identification information of the initiator of the event; the second request is a processing request for the promotion order and is related to the event.
[0092] Optionally, in a case where the SQL operation is associated with a designated event for the promotion order, the target SQL record information further includes identification information of the designated event.
[0093] Based on the same inventive concept, the present disclosure also provides an order information acquisition device, Figure 6 is a block diagram of an order information acquisition device according to an exemplary embodiment. Figure 6 As shown, the order information processing device 60 may include: The second acquisition module 61 is configured to, in response to receiving a query instruction for a promotion order, acquire target order record information related to the promotion order from the first database, wherein the target order record information is obtained by the order information processing method provided in any of the above embodiments of the present disclosure.
[0094] Reference below Figure 7 , which shows an electronic device (eg Figure 1The terminal device in the embodiment of the present disclosure may include, but is not limited to, mobile terminals such as mobile phones, laptop computers, digital broadcast receivers, PDAs (personal digital assistants), PADs (tablet computers), PMPs (portable multimedia players), in-vehicle terminals (such as in-vehicle navigation terminals), and fixed terminals such as digital TVs and desktop computers. Figure 7 The electronic device shown is only an example and should not limit the functions and scope of use of the embodiments of the present disclosure.
[0095] like Figure 7 As shown, electronic device 600 may include a processing device (e.g., a central processing unit, a graphics processing unit, etc.) 601, which can perform various appropriate actions and processes according to programs stored in a read-only memory (ROM) 602 or programs loaded from a storage device 608 into a random access memory (RAM) 603. RAM 603 also stores various programs and data required for the operation of electronic device 600. Processing device 601, ROM 602, and RAM 603 are interconnected via a bus 604. An input / output (I / O) interface 605 is also connected to bus 604.
[0096] Typically, the following devices may be connected to the I / O interface 605: an input device 606 including, for example, a touch screen, a touchpad, a keyboard, a mouse, a camera, a microphone, an accelerometer, a gyroscope, etc.; an output device 607 including, for example, a liquid crystal display (LCD), a speaker, a vibrator, etc.; a storage device 608 including, for example, a magnetic tape, a hard disk, etc.; and a communication device 609. The communication device 609 may allow the electronic device 600 to communicate with other devices wirelessly or by wire to exchange data. Figure 7 The electronic device 600 is shown with various devices, but it should be understood that it is not required to implement or possess all of the devices shown. More or fewer devices may be implemented or possessed instead.
[0097] In particular, according to an embodiment of the present disclosure, the process described above with reference to the flowchart can be implemented as a computer software program. For example, an embodiment of the present disclosure includes a computer program product, which includes a computer program carried on a non-transitory computer-readable medium, and the computer program includes a program code for executing the method shown in the flowchart. In such an embodiment, the computer program can be downloaded and installed from the network through the communication device 609, or installed from the storage device 608, or installed from the ROM 602. When the computer program is executed by the processing device 601, the above-mentioned functions defined in the method of the embodiment of the present disclosure are performed.
[0098] It should be noted that the computer-readable medium described above in the present disclosure may be a computer-readable signal medium or a computer-readable storage medium, or any combination thereof. Computer-readable storage media may include, for example, but not limited to, electrical, magnetic, optical, electromagnetic, infrared, or semiconductor systems, devices, or components, or any combination thereof. More specific examples of computer-readable storage media may include, but are not limited to, an electrical connection having one or more conductors, a portable computer disk, a hard disk, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination thereof. In the present disclosure, a computer-readable storage medium may be any tangible medium containing or storing a program that can be used by or in conjunction with an instruction execution system, apparatus, or device. In the present disclosure, a computer-readable signal medium may include a data signal propagated in baseband or as part of a carrier wave, carrying computer-readable program code. Such a propagated data signal may take a variety of forms, including, but not limited to, electromagnetic signals, optical signals, or any suitable combination thereof. A computer-readable signal medium may also be any computer-readable medium other than a computer-readable storage medium that can transmit, propagate, or transport a program for use by or in connection with an instruction execution system, apparatus, or device. Program code embodied on a computer-readable medium may be transmitted using any suitable medium, including but not limited to wire, optical cable, RF (radio frequency), or any suitable combination thereof.
[0099] In some embodiments, the client and server can communicate using any currently known or later developed network protocol, such as HTTP (HyperText Transfer Protocol), and can be interconnected with any form or medium of digital data communication (e.g., a communication network). Examples of communication networks include a local area network ("LAN"), a wide area network ("WAN"), an internet (e.g., the Internet), and a peer-to-peer network (e.g., an ad hoc peer-to-peer network), as well as any currently known or later developed network.
[0100] The computer-readable medium may be included in the electronic device, or may exist independently without being incorporated into the electronic device.
[0101] The computer-readable medium carries one or more programs, which, when executed by the electronic device, causes the electronic device to: obtain first order record information related to a promotion order, the promotion order being used to promote the promotion content; Asynchronously writing the first order record information into a message queue; The target order record information is obtained according to the first order record information through the message consumer corresponding to the message queue, and the target order record information is written into the first database, wherein the target order record information includes the first order record information.
[0102] Alternatively, the computer-readable medium carries one or more programs. When the one or more programs are executed by the electronic device, the electronic device: in response to receiving a query instruction for a promotional order, obtains target order record information related to the promotional order from the first database, where the target order record information is obtained through the order information processing method provided by the present disclosure.
[0103] Computer program code for performing the operations of the present disclosure may be written in one or more programming languages, or a combination thereof, including, but not limited to, object-oriented programming languages such as Java, Smalltalk, C++, and conventional procedural programming languages such as "C" or similar programming languages. The program code may be executed entirely on the user's computer, partially on the user's computer, as a stand-alone software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server. In cases involving a remote computer, the remote computer may be connected to the user's computer via any type of network, including a local area network (LAN) or a wide area network (WAN), or may be connected to an external computer (e.g., via the Internet using an Internet service provider).
[0104] The flowcharts and block diagrams in the accompanying drawings illustrate the possible implementation architecture, functions and operations of the systems, methods and computer program products according to various embodiments of the present disclosure. In this regard, each box in the flowchart or block diagram can represent a module, program segment, or a part of code, and the module, program segment, or a part of code contains one or more executable instructions for realizing the specified logical function. It should also be noted that in some alternative implementations, the functions marked in the box can also occur in a different order than that marked in the accompanying drawings. For example, two boxes represented in succession can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, depending on the functions involved. It should also be noted that each box in the block diagram and / or flowchart, and the combination of the boxes in the block diagram and / or flowchart, can be implemented with a dedicated hardware-based system that performs the specified function or operation, or can be implemented with a combination of dedicated hardware and computer instructions.
[0105] The modules described in the embodiments of the present disclosure may be implemented in software or hardware. In some cases, the name of a module does not necessarily limit the module itself. For example, the first acquisition module may also be described as a "module for acquiring order record information."
[0106] The functions described above herein may be performed, at least in part, by one or more hardware logic components. For example, and without limitation, exemplary types of hardware logic components that may be used include: field programmable gate arrays (FPGAs), application specific integrated circuits (ASICs), application specific standard products (ASSPs), systems on chips (SOCs), complex programmable logic devices (CPLDs), and the like.
[0107] In the context of the present disclosure, a machine-readable medium may be a tangible medium that may contain or store a program for use by or in conjunction with an instruction execution system, apparatus, or device. A machine-readable medium may be a machine-readable signal medium or a machine-readable storage medium. A machine-readable medium may include, but is not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any suitable combination of the foregoing. More specific examples of machine-readable storage media may include an electrical connection based on one or more wires, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), optical fibers, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.
[0108] According to one or more embodiments of the present disclosure, Example 1 provides a method for processing order information, the method comprising: Obtaining first order record information related to a promotion order, wherein the promotion order is used to promote the promotion content; Asynchronously writing the first order record information into a message queue; The target order record information is obtained according to the first order record information through the message consumer corresponding to the message queue, and the target order record information is written into the first database, wherein the target order record information includes the first order record information.
[0109] According to one or more embodiments of the present disclosure, Example 2 provides the method of Example 1, wherein obtaining target order record information according to the first order record information through the message consumer corresponding to the message queue includes: If the first order record information does not include information of the specified field, the information of the specified field is obtained through the message consumer, and the target order record information includes the first order record information and the information of the specified field.
[0110] According to one or more embodiments of the present disclosure, Example 3 provides the method of Example 2, wherein obtaining the information of the specified field through the message consumer includes: The message consumer queries a second database based on the information included in the first order record information to obtain the information of the specified field, and the second database stores the information of the specified field.
[0111] According to one or more embodiments of the present disclosure, Example 4 provides the method of Example 1, wherein the target order record information includes target event record information for a specified event of the promotional order, and the target event record information includes at least one of the following: Identification information of the specified event; the event name of the specified event; the time when the specified event occurred; the triggering method information of the specified event; identification information of the initiator of the specified event; information used to indicate the event dimension of the specified event; identification information corresponding to the event dimension; identification information of the promotion order; identification information of the creator of the promotion content; identification information of the person who placed the promotion order; identification information of the promotion content; information used to indicate the preset operation corresponding to the specified event; result information used to indicate whether the preset operation is successful; processing time of the specified event; identification information of the log corresponding to the first request; information of the service used to execute the specified event; information of the upstream service of the service used to execute the specified event; the first request is a processing request for the promotion order and is related to the specified event.
[0112] According to one or more embodiments of the present disclosure, Example 5 provides the method of Example 1, wherein the target order record information includes target SQL record information of a structured query language SQL operation associated with the promotional order, and the target SQL record information includes at least one of the following: Information on the data table associated with the SQL operation; the SQL statement executed by the SQL operation; result information indicating whether the SQL operation is successful; information on the SQL transaction corresponding to the SQL operation; identification information of the log corresponding to the second request; information on the service used to execute the event; information on the upstream service of the service used to execute the event; identification information of the initiator of the event; the second request is a processing request for the promotion order and is related to the event.
[0113] According to one or more embodiments of the present disclosure, Example 6 provides the method of Example 5, wherein, when the SQL operation is associated with a specified event for the promotion order, the target SQL record information further includes identification information of the specified event.
[0114] According to one or more embodiments of the present disclosure, Example 7 provides a method for obtaining order information, the method comprising: In response to receiving a query instruction for a promotion order, target order record information related to the promotion order is obtained from a first database, where the target order record information is obtained by the order information processing method described in any one of Examples 1 to 6.
[0115] According to one or more embodiments of the present disclosure, Example 8 provides an order information processing device, the device comprising: A first acquisition module is used to acquire first order record information related to a promotion order, wherein the promotion order is used to promote the promotion content; an asynchronous writing module, configured to asynchronously write the first order record information into a message queue; A database writing module is used to obtain target order record information according to the first order record information through the message consumer corresponding to the message queue, and write the target order record information into the first database, wherein the target order record information includes the first order record information.
[0116] According to one or more embodiments of the present disclosure, Example 9 provides an order information acquisition device, the device comprising: The second acquisition module is configured to, in response to receiving a query instruction for a promotion order, acquire target order record information related to the promotion order from the first database, wherein the target order record information is obtained by the order information processing method described in any one of Examples 1 to 6.
[0117] According to one or more embodiments of the present disclosure, Example 10 provides a computer-readable medium on which a computer program is stored, characterized in that when the computer program is executed by a processing device, the steps of the method described in any one of Examples 1 to 6 are implemented, or when the computer program is executed by a processing device, the steps of the method described in Example 7 are implemented.
[0118] According to one or more embodiments of the present disclosure, Example 11 provides an electronic device, including: a storage device having a computer program stored thereon; A processing device, configured to execute the computer program in the storage device to implement the steps of the method described in any one of Examples 1 to 6, or to implement the steps of the method described in Example 7.
[0119] According to one or more embodiments of the present disclosure, Example 12 provides a computer program product, including a computer program, which, when executed by a processor, implements the steps of the method described in any one of Examples 1 to 6, or, when executed by a processor, implements the steps of the method described in Example 7.
[0120] The above description is merely a preferred embodiment of the present disclosure and an illustration of the technical principles employed. Those skilled in the art should understand that the scope of the present disclosure is not limited to technical solutions formed by specific combinations of the aforementioned technical features. It also encompasses other technical solutions formed by any combination of the aforementioned technical features or their equivalents, without departing from the scope of the above disclosure. For example, a technical solution formed by replacing the aforementioned features with (but not limited to) technical features with similar functions disclosed in this disclosure.
[0121] In addition, although each operation is described in a specific order, this should not be understood as requiring these operations to be performed in the specific order shown or in a sequential order. Under certain circumstances, multitasking and parallel processing may be advantageous. Similarly, although some specific implementation details have been included in the above discussion, these should not be interpreted as limiting the scope of the present disclosure. Some features described in the context of a separate embodiment can also be implemented in a single embodiment in combination. On the contrary, the various features described in the context of a single embodiment can also be implemented in multiple embodiments individually or in any suitable sub-combination mode.
[0122] Although the subject matter has been described using language specific to structural features and / or methodological logical acts, it should be understood that the subject matter defined in the appended claims is not necessarily limited to the specific features or acts described above. Rather, the specific features and acts described above are merely example forms of implementing the claims. Regarding the apparatus in the above-described embodiments, the specific manner in which each module performs operations has been described in detail in the embodiments related to the method and will not be elaborated upon here.
Claims
1. A method for processing order information, characterized in that: The method comprises: Obtaining first order record information related to a promotion order, wherein the promotion order is used to promote the promotion content; Asynchronously writing the first order record information into a message queue; The target order record information is obtained according to the first order record information through the message consumer corresponding to the message queue, and the target order record information is written into the first database, wherein the target order record information includes the first order record information.
2. The method according to claim 1, characterized in that The message consumer corresponding to the message queue obtains target order record information according to the first order record information, including: If the first order record information does not include information of the specified field, the information of the specified field is obtained through the message consumer, and the target order record information includes the first order record information and the information of the specified field.
3. The method according to claim 2, characterized in that The obtaining of the information of the specified field through the message consumer includes: The message consumer queries a second database based on the information included in the first order record information to obtain the information of the specified field, and the second database stores the information of the specified field.
4. The method according to claim 1, wherein The target order record information includes target event record information for a specified event of the promotion order, and the target event record information includes at least one of the following: The identification information of the designated event; the event name of the designated event; the time when the designated event occurred; the triggering method information of the designated event; the identification information of the initiator of the designated event; information indicating the event dimension of the designated event; the identification information corresponding to the event dimension; the identification information of the promotion order; the identification information of the creator of the promotion content; the identification information of the person who placed the promotion order; the identification information of the promotion content; Information for indicating a preset operation corresponding to the specified event; Result information indicating whether the preset operation is successful; processing time of the specified event; Identification information of the log corresponding to the first request; Information on services used to perform the specified event; Information about an upstream service for executing the service of the specified event; The first request is a processing request for the promotion order and is related to the designated event.
5. The method according to claim 1, wherein The target order record information includes target SQL record information of a structured query language SQL operation associated with the promotion order, and the target SQL record information includes at least one of the following: Information about the data table associated with the SQL operation; the SQL statement executed by the SQL operation; result information indicating whether the SQL operation is successful; information about the SQL transaction corresponding to the SQL operation; identification information of the log corresponding to the second request; information about the service used to execute the event; Information of an upstream service of a service for executing an event; identification information of an initiator of the event; and the second request is a processing request for the promotion order and is related to the event.
6. The method according to claim 5, characterized in that In the case where the SQL operation is associated with a designated event for the promotion order, the target SQL record information further includes identification information of the designated event.
7. A method for obtaining order information, characterized in that: The method comprises: In response to receiving a query instruction for a promotion order, target order record information related to the promotion order is obtained from a first database, wherein the target order record information is obtained by the order information processing method according to any one of claims 1 to 6.
8. An order information processing device, characterized in that: The device comprises: A first acquisition module is used to acquire first order record information related to a promotion order, wherein the promotion order is used to promote the promotion content; an asynchronous writing module, configured to asynchronously write the first order record information into a message queue; A database writing module is used to obtain target order record information according to the first order record information through the message consumer corresponding to the message queue, and write the target order record information into the first database, wherein the target order record information includes the first order record information.
9. An order information acquisition device, characterized in that: The device comprises: The second acquisition module is configured to, in response to receiving a query instruction for a promotion order, acquire target order record information related to the promotion order from the first database, wherein the target order record information is obtained by the order information processing method according to any one of claims 1 to 6.
10. A computer-readable medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processing device, the steps of the method described in any one of claims 1 to 6 are implemented, or when the computer program is executed by a processing device, the steps of the method described in claim 7 are implemented.
11. An electronic device, characterized in that: include: a storage device having a computer program stored thereon; A processing device, configured to execute the computer program in the storage device to implement the steps of the method according to any one of claims 1 to 6, or to implement the steps of the method according to claim 7.
12. A computer program product comprising a computer program, characterized in that When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 6 are implemented; or when the computer program is executed by a processor, the steps of the method according to claim 7 are implemented.