Data message analysis method and device, equipment, storage medium and product

By dividing and converting data nodes in computing network services, reassembling messages, and using multi-threaded analysis technology, the problem of efficient transmission and parsing of large-scale messages is solved, which improves efficiency and reduces resource consumption, and solves computing network Performance bottlenecks for message transmission and parsing in service.

CN119316499AActive Publication Date: 2025-01-14中移信息技术有限公司 +1
View PDF 6 Cites 0 Cited by

Patent Information

Application Number
CN202411573558.9
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-11-05
Publication Date
2025-01-14
Estimated Expiration
2044-11-05

AI Technical Summary

Technical Problem

In the computing network service subscription, the same order contains a large number of sub-orders and product attributes, resulting in high requirements for message transmission and resolution, increasing network latency and server resource consumption, and causing performance bottlenecks.

Method used

By receiving network order data, dividing data nodes, converting non-slave nodes into parameter values, reassembling messages, using preset message analysis configuration and multi-threading methods to parse data objects, reducing data volume and resource consumption.

Benefits of technology

Improve packet resolution efficiency, reduce order processing time and resource consumption, and significantly reduce server performance bottlenecks.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119316499A_ABST
    Figure CN119316499A_ABST
Patent Text Reader

Abstract

The invention discloses a data message analysis method and device, equipment, a storage medium and a product, and relates to the technical field of cloud computing, the data message analysis method comprises the following steps: receiving computing network order data, the computing network order data comprising a plurality of sub-order data, and the sub-order data comprising a plurality of data nodes; on the basis of the data nodes, dividing the sub-order data through separators to obtain an assembled data message, and converting the data nodes, which do not contain slave nodes, in the assembled data message into node parameter values; and performing reading processing on the assembled data message through preset message analysis configuration, and after reading is completed, analyzing a data object in the calculation network order data in a multi-thread mode. According to the method and the device, the data message with relatively large data volume can be quickly transmitted and completely analyzed.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of cloud computing technology, and in particular to a data message parsing method, device, equipment, storage medium and computer program product. Background Art

[0002] In the ordering of computing network services, the same order often contains a large number of sub-order businesses. At the same time, each sub-order also contains a large number of product attributes and dimensional attributes. Each sub-order also derives nodes of different levels, and each node contains data messages. This makes the message corresponding to the order, whether it is transmitted or parsed, higher than the previous message requirements. If the order quantity is very large, the transmission will seriously increase the network delay, resulting in a decline in user experience. In addition, the processing and parsing of large messages will consume a lot of CPU and memory resources, which may cause server performance bottlenecks.

[0003] Therefore, how to quickly transmit and completely parse such ever-expanding messages is a difficult problem faced by those skilled in the art.

[0004] The above contents are only used to assist in understanding the technical solution of the present application and do not constitute an admission that the above contents are prior art. Summary of the invention

[0005] The main purpose of the present application is to provide a data message parsing method, device, equipment, storage medium and computer program product, aiming to solve the technical problem in the related technology that the same order business may contain a large number of product attributes, so that the message corresponding to the order, whether transmitted or parsed, will have higher requirements than previous messages, and it is impossible to achieve fast transmission and complete parsing of order data messages.

[0006] To achieve the above object, the present application proposes a data message parsing method, the data message parsing method comprising: Receive computing network order data, wherein the computing network order data includes a plurality of sub-order data, and the sub-order data includes a plurality of data nodes; Based on each of the data nodes, each of the sub-order data is divided by a separator to obtain an assembled data message, wherein the data nodes that do not contain slave nodes in the assembled data message are converted into node parameter values; The assembled data message is read and processed through a preset message parsing configuration, and after the reading is completed, the data objects in the computing network order data are parsed in a multi-threaded manner.

[0007] In one embodiment, the step of dividing each of the sub-order data by a separator based on each of the data nodes to obtain an assembled data message includes: Determine whether a data node in each of the sub-order data has a subordinate node; If it is determined that the data node does not have a subordinate node, compressing the data in the data node into a node parameter value; If it is determined that the data node has a subordinate node, then the data tag of the data node is saved; The data label and the node parameter value are integrated through a separator to obtain an assembled data message.

[0008] In one embodiment, the step of reading and processing the assembled data message through a preset message parsing configuration includes: Read the assembled message data segment by segment in a streaming processing manner to determine the subordinate order relationship of each of the data nodes in the assembled data message; For data nodes that have subordinate nodes, read the data content in each of the data nodes in sequence according to the subordinate order relationship and the data label; For a data node that does not have a subordinate node, a node parameter value corresponding to the data node is written into a preset algorithm instance to obtain the data content in the data node.

[0009] In one embodiment, the step of parsing the data objects in the computing network order data in a multi-threaded manner includes: Synchronously read the data in each data node in a multi-threaded manner to obtain multiple subtask data; Placing each of the subtask data in an independent task for parsing to obtain parsed data; For each of the data nodes, each of the parsed data is written into the instance object of the parent node corresponding to the current node.

[0010] In one embodiment, the data nodes include parameter value nodes and no parameter value nodes, and the step of writing each parsed data into the instance object of the parent node corresponding to the current node for each data node includes: For the parameter value nodes, after the data parsing processing of all parameter value nodes is completed, the parsing data of the parameter value nodes that currently have no subordinate nodes are integrated to obtain a parsing data set; Writing the parsed data set into the instance object of the parent node; For a node without a parameter value, the node without a parameter value is split by the separator to obtain a plurality of first parameter values; The first parameter value is written into the instance object of the first node to which the current node belongs.

[0011] In one embodiment, the preset message parsing configuration includes multiple configuration fields, and the configuration fields include interface name, data node attributes, and current node processing mode. The configuration fields are used to synchronously read or parse the data content of each of the separated data nodes.

[0012] In addition, to achieve the above purpose, the present application also proposes a data message parsing device, the data message parsing device comprising: A receiving module, used to receive computing network order data, wherein the computing network order data includes a plurality of sub-order data, and the sub-order data includes a plurality of data nodes; A partitioning module, configured to partition each of the sub-order data by a separator based on each of the data nodes to obtain an assembled data message, wherein the data nodes that do not contain a slave node in the assembled data message are converted into node parameter values; The processing module is used to read and process the assembled data message through a preset message parsing configuration, and after the reading is completed, parse the data objects in the computing network order data in a multi-threaded manner.

[0013] In addition, to achieve the above-mentioned purpose, the present application also proposes a data packet parsing device, which includes: a memory, a processor, and a computer program stored in the memory and executable on the processor, and the computer program is configured to implement the steps of the data packet parsing method described above.

[0014] In addition, to achieve the above-mentioned purpose, the present application also proposes a storage medium, which is a computer-readable storage medium, and a computer program is stored on the storage medium. When the computer program is executed by the processor, the steps of the data message parsing method described above are implemented.

[0015] In addition, to achieve the above-mentioned purpose, the present application also provides a computer program product, which includes a computer program, and when the computer program is executed by a processor, the steps of the data message parsing method described above are implemented.

[0016] The present application proposes a data message parsing method, device, equipment, storage medium and computer program product. The present application receives computing network order data, which includes multiple sub-order data, and the sub-order data includes multiple data nodes. The data nodes that do not contain subordinate nodes are converted into parameter values, thereby reducing the volume of the transmitted data message, thereby configuring a streamlined message structure and compressing the data volume by reassembling the message, and then reading and processing the assembled data message through a preset message parsing configuration. After the reading is completed, the data objects in the computing network order data are parsed in a multi-threaded manner. When the parsing of the data message is completed, the message parsing efficiency is improved and the resource consumption is reduced, and the order processing time is significantly reduced. BRIEF DESCRIPTION OF THE DRAWINGS

[0017] The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the present application and, together with the description, serve to explain the principles of the present application.

[0018] In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, for ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative labor.

[0019] Figure 1 A flowchart of the first embodiment of the data message parsing method of the present application is provided; Figure 2 A schematic diagram of the subscription message flow and processing flow involved in the data message parsing method of this application; Figure 3 A schematic diagram of the XML message structure provided for the data message parsing method of this application; Figure 4 A schematic diagram of the structure of assembling a data message for the data message parsing method of this application; Figure 5 A schematic diagram of the preset message parsing configuration fields involved in the data message parsing method of this application; Figure 6 A flowchart of the second embodiment of the data message parsing method of the present application is provided; Figure 7 A schematic diagram of the processing process of message parsing involved in the data message parsing method of this application; Figure 8 This is a schematic diagram of the parsing message structure involved in the data message parsing method of this application; Fig. 9 This is a schematic diagram of the module structure of the data message parsing device according to an embodiment of the present application; Fig.10A schematic diagram of the device structure of the hardware operating environment involved in the data message parsing method in the embodiment of the present application.

[0020] The purpose, features and advantages of this application will be further described in conjunction with the embodiments and with reference to the accompanying drawings. DETAILED DESCRIPTION

[0021] It should be understood that the specific embodiments described herein are only used to explain the technical solutions of the present application and are not used to limit the present application.

[0022] In order to better understand the technical solution of the present application, a detailed description will be given below in conjunction with the accompanying drawings and specific implementation methods.

[0023] The main solutions of the embodiments of this application are: Receive computing network order data, wherein the computing network order data includes a plurality of sub-order data, and the sub-order data includes a plurality of data nodes; Based on each of the data nodes, each of the sub-order data is divided by a separator to obtain an assembled data message, wherein the data nodes that do not contain slave nodes in the assembled data message are converted into node parameter values; The assembled data message is read and processed through a preset message parsing configuration, and after the reading is completed, the data objects in the computing network order data are parsed in a multi-threaded manner.

[0024] In the existing ordering system, usually one of the systems assembles the ordering data into a message in XML (Extensible Markup Language) format, and calls the service interface of other systems through HTTP (Hypertext Transfer Protocol) or HTTPS. The data volume of normal ordering messages is not very large, so there is no problem in completing the interaction in this way. However, for Suanwang combined ordering, there are often hundreds of sub-ordering data in one message, and each sub-order will have a considerable number of product attributes and dimensional attributes. If the existing method is continued, the ordering data transmission speed will be slow. Due to its structural characteristics, XML messages will contain a large number of tags to express the hierarchical relationship and attribute information of the data. With the increase in the number of sub-orders and the increase in attribute complexity, the size of XML messages will increase accordingly, resulting in more time and bandwidth resources required during network transmission. This is because XML format messages are not effectively compressed before transmission, and the data transmission speed is naturally affected by the delay and bandwidth limitation of network transmission itself. Therefore, for the processing technology of Suanwang's large-scale orders, the data can only be written into files and synchronized to other platforms. This processing method is very unfriendly to customers, and the existing technology will be very stressful to parse messages. For customers, asynchronous processing of large-scale orders using file synchronization will cause obvious delays, because the order data is first written into the file and then synchronized to other platforms for processing, rather than responding in real time, which undoubtedly increases waiting time and reduces customer experience. In addition, when the server receives and parses such large XML messages, due to the large number of tags and complex hierarchical structure, the entire XML tree structure needs to be traversed during the parsing process, which consumes a lot of CPU (central processing unit) and memory resources, has low parsing efficiency and is prone to server performance bottlenecks. This is why existing technologies face tremendous pressure when parsing large-scale computing network order messages.

[0025] The present application proposes a data message parsing method, device, equipment, storage medium and computer program product. The present application receives computing network order data, which includes multiple sub-order data, and the sub-order data includes multiple data nodes. The data nodes that do not contain subordinate nodes are converted into parameter values, thereby reducing the volume of the transmitted data message, thereby configuring a streamlined message structure and compressing the data volume by reassembling the message, and then reading and processing the assembled data message through a preset message parsing configuration. After the reading is completed, the data objects in the computing network order data are parsed in a multi-threaded manner. When the parsing of the data message is completed, the message parsing efficiency is improved and the resource consumption is reduced, and the order processing time is significantly reduced.

[0026] It should be noted that the execution subject of this embodiment may be a computing service device with data processing, network communication and program running functions, such as a tablet computer, a personal computer, a mobile phone, etc., or an electronic device, an ordering platform or a data message parsing device capable of realizing the above functions. The following takes a data message parsing device as an example to illustrate this embodiment and the following embodiments.

[0027] Based on this, the present application embodiment provides a data message parsing method, referring to Figure 1 , Figure 1 This is a flow chart of the first embodiment of the data message parsing method of the present application.

[0028] In this embodiment, the data message parsing method includes steps S10 to S30: Step S10, receiving computing network order data, wherein the computing network order data includes a plurality of sub-order data, and the sub-order data includes a plurality of data nodes; It should be noted that the Suanwang is a new type of information infrastructure that takes computing as the center and the network as the foundation, and deeply integrates the network, cloud, data, intelligence, security, edge, end, and chain to provide integrated services. Various order data can be processed on the Suanwang. The Suanwang order data includes various types of data such as product data and product attributes. During the transmission process, the Suanwang order data contains a large amount of information and data messages.

[0029] Specifically, the flow and processing flow of the subscription message involved in this embodiment is as follows: Figure 2 As shown by Figure 2 It can be seen that the ordering process is at the front end. The order system receives the computing network order data and assembles the computing network order data message to obtain the assembled data message. Then, the assembled data message is transmitted to the ordering platform for parsing. The parsing process mainly uses the parsing configuration interface to parse the data in multiple threads, and encapsulates the parsed data into instance objects for subsequent use.

[0030] It should be noted that in the entire computing network order data, because it contains a variety of information, it is divided into multiple sub-order data. For each sub-order data, there will also be multiple different data nodes to store data. Figure 3For example, for data nodes at each level, in the hierarchical structure of the interface specification, ProvInfo (a file containing multiple data types, generally used as the initial node) is a first-level node. There are usually multiple first-level nodes, and each ProvInfo represents a sub-order. There can be multiple second-level nodes under a first-level node, such as AccountInfo (account information) and ProductInfo (product information). Second-level nodes can have the same or different label names. If multiple second-level nodes have the same label name, they are in a parallel relationship; otherwise, they are not in a parallel relationship.

[0031] Each second-level node can further contain third-level nodes, such as SubProductInfo (sub-product information). The third-level node belongs to the corresponding second-level node, that is, SubProductInfo belongs to ProductInfo. Similarly, the third-level nodes can also have the same or different label names. If multiple third-level nodes have the same label name, they are in a parallel relationship; otherwise, they are not in a parallel relationship. By analogy, each node can derive multiple child nodes downward, and nodes at the same level can have multiple identical or different label names, forming a parallel relationship.

[0032] It should be noted that, in the above examples, each parent node as the upper-level node can continuously derive child nodes downward, and each child node can also continuously derive child nodes further downward, and this derivation relationship can be infinitely cyclic.

[0033] Step S20, based on each of the data nodes, each of the sub-order data is divided by a separator to obtain an assembled data message, wherein the data nodes that do not contain slave nodes in the assembled data message are converted into node parameter values; It should be noted that the existing data message contains data tags of multiple nodes. Usually, an XML message will have a start tag (such as <provinfo> ) and a closing tag (such as< / provinfo> ), when other elements are contained in the ProvInfo (used to indicate system status information, such as start / end status) tag, they become sub-elements of ProvInfo. This structure can clearly indicate the hierarchy of data, but the number of tag names is often very large, which makes the message size very large.

[0034] In order to reduce the size of the message, in this embodiment, most of the labels in each sub-order data are ignored, and only the labels of the existing child nodes are retained. For child nodes without the next level nodes or data nodes without subordinate nodes, only parameter values ​​are retained, which can greatly reduce the size of the message.

[0035] It should be noted that the assembled data message is a data message obtained by merging the labels of each node after data conversion. Compared with ordinary data messages, the assembled data message is smaller in size and consumes less network resources during data transmission.

[0036] It should be noted that the separator in the data message mainly serves to separate the data so that the intervals of various parameter values ​​can be clearly distinguished in the subsequent parsing process, making it easier to distinguish.

[0037] Specifically, taking the above XML message as an example, first retain the first-level node <provinfo>, since the secondary node <AccountId (account label)> has no sub - nodes, only the parameter value, that is, "account code", is retained, and the secondary node <productinfo>Include a third-level node <SubProductInfo (Sub-product Information)>, and the third-level node <subproductinfo>Include the fourth-level nodes <ProductOrderID (Product Order Label)> and <FeeInfo (Fee Information)>. Therefore, this third-level node is retained, and the fourth-level nodes <productorderid>Since there are no child nodes, only the parameter value, i.e. "Order Code", is retained, and so on, until the data is fully assembled. In addition, when multiple child labels without next-level nodes are adjacent, [|] (separator) is used to separate them, so that the interval of parameter values ​​can be clearly distinguished, and it can also be easily distinguished during parsing.

[0038] It is important to understand that the structural diagram of the assembled data message is as follows Figure 4 As shown, those data nodes that do not have the next level nodes are displayed in the form of parameter values, and other data nodes retain the corresponding data labels. The format of the assembled data message in this application needs to be used in conjunction with the preset parsing configuration interface. The content of the message is assembled according to the node order of the interface specification. Each parameter value corresponds to a node of the interface specification. The content cannot be read by looking at the message alone, but the lightweightness brought about has been well applied.

[0039] In a feasible implementation manner, the step S20 of dividing each of the sub-order data by a separator based on each of the data nodes to obtain an assembled data message includes: Determine whether a data node in each of the sub-order data has a subordinate node; It should be noted that in the process of dividing each sub-order data, it is necessary to first determine whether there are subordinate nodes in the data node of the sub-order data. The subordinate node is the next level node, and different division steps are performed according to different situations.

[0040] If it is determined that the data node does not have a subordinate node, compressing the data in the data node into a node parameter value; It should be noted that when it is determined that the current data node does not exist, the data in the data node is compressed so that it is stored in the form of parameter values ​​in the data message to reduce the size of the data message.

[0041] If it is determined that the data node has a subordinate node, then the data tag of the data node is saved; It should be noted that when it is determined that a data node has a subordinate node, and the data node contains a lot of data, the label of the data node is retained to ensure normal storage of the data, and similar operations are performed for other data nodes with subordinate nodes.

[0042] The data label and the node parameter value are integrated through a separator to obtain an assembled data message.

[0043] It should be noted that the data label and the node parameter value are separated by a separator to facilitate the subsequent parsing process, and then the various data nodes are assembled together to obtain an assembled data message.

[0044] Step S30, reading and processing the assembled data message through a preset message parsing configuration, and after the reading is completed, parsing the data objects in the computing network order data in a multi-threaded manner.

[0045] It should be noted that the preset message parsing configuration corresponds to the assembly specification of the assembled data message, which includes multiple configuration fields. By receiving the assembled data message through the preset message parsing configuration interface, information can be extracted through each configuration field and each data node in the assembled data message to achieve the purpose of fast transmission.

[0046] In a feasible implementation manner, the step S30 of reading and processing the assembled data message through a preset message parsing configuration includes: Read the assembled message data segment by segment in a streaming processing manner to determine the subordinate order relationship of each of the data nodes in the assembled data message; It should be noted that, during the reading process, after receiving the request message, the ordering service platform interface service framework adopts the SAX parsing mechanism (Simple API for XML, an event-driven parsing method) to read and parse the message content in real time in a streaming manner. In this process, the system cleverly executes the reading and parsing tasks synchronously, and at the same time, with the help of the pre-set JavaBean (a Java class instance that follows a specific writing specification, mainly used to encapsulate data, provide business logic, and facilitate code reuse and decoupling) object system, it instantly captures and stores the key data of each node in the message, covering node names, attribute details, parameter values ​​and other multivariate information. This customized data model is carefully designed for the deep nested structure that may appear in the message, ensuring that the hierarchical association information inside the message can be accurately and efficiently carried and reproduced. This embodiment disassembles the parsing process into several continuous and collaborative steps, makes full use of the working mode of reading and parsing, and significantly improves the execution efficiency of message parsing, thereby effectively promoting the rapidity and high efficiency of the data storage operation after parsing.

[0047] It should be noted that each data node is at a different level due to its subordinate relationship. At different levels, the subordinate order is different. For example, A is a first-level node and B is a second-level node, and A is ranked higher than B.

[0048] For data nodes that have subordinate nodes, read the data content in each of the data nodes in sequence according to the subordinate order relationship and the data label; It should be noted that for data nodes with subordinate nodes, the data labels of each data node are retained according to the sequential relationship of different levels, and the data content in each data node is read in sequence according to the hierarchical relationship from primary to secondary.

[0049] For a data node that does not have a subordinate node, a node parameter value corresponding to the data node is written into a preset algorithm instance to obtain the data content in the data node.

[0050] It should be noted that for data nodes that do not have subordinate nodes, these data nodes have been converted into node parameter values. The preset algorithm instance is a JavaBean object in the preset message parsing configuration. By writing the node parameter value into the preset algorithm instance, all data nodes without subordinate nodes / descendants under the first node can be parsed.

[0051] In a feasible implementation, the preset message parsing configuration includes multiple configuration fields, the configuration fields include interface name, data node attributes and current node processing mode, and the configuration fields are used to synchronously read or parse the data content of each separated data node.

[0052] It should be noted that the preset message parsing configuration includes multiple configuration fields. The ordering platform interface service will load the following when it is started: Figure 5 The interface shown parses the message configuration, and pre-creates and manages a certain number of JavaBean objects according to the bean_map (an application program interface for operating JavaBeans, which can convert a JavaBean object into a Map object (an object that maps keys to values)) information in the configuration.

[0053] Depend on Figure 5 The configuration fields are described as follows: interface_name: interface name; field: node name; field_level: node level; is_child_nodes: whether there are descendants, 0-no, 1-yes; is_mult_thread: whether to process in multiple threads, 0-no, 1-yes; is_same: whether there are identical nodes, 0-no, 1-yes; bean_map: parent node JavaBean object (algorithm instance object).

[0054] The present application proposes a data message parsing method, device, equipment, storage medium and computer program product. The present application receives computing network order data, which includes multiple sub-order data, and the sub-order data includes multiple data nodes. The data nodes that do not contain subordinate nodes are converted into parameter values, thereby reducing the volume of the transmitted data message, thereby configuring a streamlined message structure and compressing the data volume by reassembling the message, and then reading and processing the assembled data message through a preset message parsing configuration. After the reading is completed, the data objects in the computing network order data are parsed in a multi-threaded manner. When the parsing of the data message is completed, the message parsing efficiency is improved and the resource consumption is reduced, and the order processing time is significantly reduced.

[0055] Based on the first embodiment of the present application, in the second embodiment of the present application, the same or similar contents as those in the above-mentioned embodiment 1 can be referred to the above introduction, and will not be repeated in the following. Figure 6 The step S30 of parsing the data objects in the computing network order data in a multi-threaded manner includes steps S31 to S33: Step S31, synchronously reading the data in each data node in a multi-threaded manner to obtain multiple subtask data; Step S32, placing each subtask data in an independent task for parsing to obtain parsed data; It should be noted that for each data node, each data node may include hundreds of data. For example, the value of is_mult_thread of the node SubProductInfo shown in the preset message parsing configuration is 1, indicating that multi-threaded processing is required. <subproductinfo>There can be hundreds of data in this node. Using multi-threaded processing will reduce the time consumption of message parsing. After a complete SubProductInfo data is read from the message, it is immediately put into an independent task for parsing. This cycle repeats until all SubProductInfo data are put into independent tasks. After the parsing is completed in the independent task, the parsed data is obtained.

[0056] It should be noted that after each task parses SubProductInfo, it returns a com.newland.crm.cmc.bean.order.SubProductInfoBean object (a type of bean-map object, used to represent the sub-product information object, the same applies below), and writes the object to the List collection. After all data processing is completed, the collection is written to the com.newland.crm.cmc.bean.order.ProvInfoBean object (starting node object) of the upper-level node. This is the logic of multi-threaded processing.

[0057] Step S33: for each of the data nodes, write each of the parsed data into the instance object of the parent node corresponding to the current node.

[0058] It should be noted that the key innovation of this application involves: for the large message structure involved in this proposal, it is based on the existing Figure 7 Based on the XML message format shown in FIG. , all tag names without descendants are omitted, and the end tags with descendants are omitted, so as to obtain the following Figure 8 The message structure shown in the figure. Therefore, a set of structural configurations needs to be given according to the interface specification, which can easily display the hierarchical relationship and affiliation of the message. In fact, the preset message analysis configuration is the key to parsing the message.

[0059] It should be noted that when multi-threaded independent tasks process SubProductInfo, the node with no descendants at the next level is also obtained, for example, ProductOrderID, and the parameter in the corresponding message is the order code 1 (such as Figure 8 As shown in the figure, after parsing the parameter value of ProductOrderID, the data is written into the parent node com.newland.crm.cmc.bean.order.SubProductInfoBean object.

[0060] In a feasible implementation manner, the data nodes include parameter value nodes and nodes without parameter values, and the step S33 of writing each parsed data into the instance object of the parent node corresponding to the current node for each data node includes: For the parameter value nodes, after the data parsing processing of all parameter value nodes is completed, the parsing data of the parameter value nodes that currently have no subordinate nodes are integrated to obtain a parsing data set; It should be noted that a parameter value node is a data node containing data, and a parameter value node includes a data node retaining a data label and a data node without a subordinate node, and a node without a parameter value is a data node containing no data.

[0061] Writing the parsed data set into the instance object of the parent node; It should be noted that after obtaining the parsed data set, the parsed data set is written into the instance object of the parent node.

[0062] It should be noted that, as shown in the preset message parsing configuration field, the processing method is different from that of data nodes that retain data tags. For data nodes without subordinate nodes, the configuration can distinguish that there are two nodes without descendants, PaySeq (payment flow) and PayType (payment method), under the node, and there is no other data afterwards. After reading all the strings of nodes without descendants, they are split according to the delimiter [|]. The first delimiter is the parameter value of PaySeq, and the second delimiter is the parameter value of PayType. The parameter values ​​are written to the com.newland.crm.cmc.bean.order.ExtendInfoBean object (extended information object) in the bean_map field.

[0063] For a node without a parameter value, the node without a parameter value is split by the separator to obtain a plurality of first parameter values; The first parameter value is written into the instance object of the first node to which the current node belongs.

[0064] It should be noted that the first parameter value is a parameter value representing empty data obtained after segmentation.

[0065] Specifically, there is also a case where there is no parameter value, for example, Figure 8 Nodes in <extendinfo>After that, there is only the parameter value "payment method 1", and this node has two descendants. When assembling the message, the [|] delimiter will be used for separation. When parsing after obtaining the data, the data will be split according to the delimiter [|]. The data will be split into 'empty' and 'payment method 1' and put into an array. The data in array 0 is the node <payseq>The parameter value is obviously 'empty', and the data in array 1 is the node <paytype>That is to say, when parsing the request message according to the node configuration, if there is a node without descendants in the configuration, its data will be split by using the separator [|]. The empty data after the split also represents the parameter value of a node.

[0066] After all the data of the child order is parsed, the processed JavaBean objects are written into the JavaBean objects of the parent node from the deep layer to the top layer, for example, ExtendInfoBean (extended information object) is written into the FeeInfoBean (payment information object) of the parent node, and FeeInfoBean is written into the SubProductInfoBean (sub-product information object) of the parent node. Finally, the request message is parsed into the ProvInfoBean (status information) object, and the object is used as the parameter of the interface service. In this way, the interface service only needs to obtain from the JavaBean object when processing the logic, which not only increases the parsing efficiency of the request message, but also makes the operation of the data more convenient and easy.

[0067] In this embodiment, multiple sub-orders are parsed in parallel through asynchronous parallel processing and multi-threading technology, which improves the efficiency of message parsing and reduces resource consumption, thereby significantly reducing the processing time of orders.

[0068] It should be noted that the above examples are only used to understand the present application and do not constitute a limitation on the data message parsing method of the present application. More simple transformations based on this technical concept are all within the scope of protection of the present application.

[0069] This application also provides a data message parsing device, please refer to Fig. 9 , the data message parsing device comprises: The receiving module 10 is used to receive the computing network order data, wherein the computing network order data includes a plurality of sub-order data, and the sub-order data includes a plurality of data nodes; A partitioning module 20 is used to partition each of the sub-order data by a separator based on each of the data nodes to obtain an assembled data message, wherein the data nodes that do not contain slave nodes in the assembled data message are converted into node parameter values; The processing module 30 is used to read and process the assembled data message through a preset message parsing configuration, and after the reading is completed, parse the data objects in the computing network order data in a multi-threaded manner.

[0070] Optionally, the division module includes: A judging unit, used for judging whether a data node in each of the sub-order data has a subordinate node; A compression processing unit, configured to compress the data in the data node into a node parameter value if it is determined that the data node has no subordinate node; A storage processing unit, configured to store a data tag of the data node if it is determined that the data node has a subordinate node; The integration processing unit is used to integrate the data label and the node parameter value through a separator to obtain an assembled data message.

[0071] Optionally, the processing module includes: A first reading unit, configured to read the assembled message data segment by segment in a streaming processing manner to determine a subordinate order relationship of each of the data nodes in the assembled data message; A second reading unit is used to read the data content in each data node in sequence according to the subordinate order relationship and the data label for the data node having the subordinate nodes; The first writing unit is used to write a node parameter value corresponding to a data node that does not have a subordinate node into a preset algorithm instance to obtain data content in the data node.

[0072] Optionally, the processing module includes: The third reading unit is used to synchronously read the data in each data node in a multi-threaded manner to obtain multiple subtask data; A parsing unit, used for placing each subtask data into an independent task for parsing to obtain parsed data; The second writing unit is used to write each of the parsed data into the instance object of the parent node corresponding to the current node for each of the data nodes.

[0073] Optionally, the second writing unit includes: An integration subunit is used for integrating the parsed data of the parameter value nodes which currently have no subordinate nodes after the data parsing processing of all the parameter value nodes is completed, so as to obtain a parsed data set; A first writing subunit, used for writing the parsed data set into the instance object of the parent node; A segmentation subunit, for segmenting a node without a parameter value by using the separator to obtain a plurality of first parameter values; The second writing subunit is used to write the first parameter value into the instance object of the head node to which the current node belongs.

[0074] The data message parsing device provided by the present application adopts the data message parsing method in the above embodiment, which can solve the technical problem of data message parsing. Compared with the prior art, the beneficial effects of the data message parsing device provided by the present application are the same as the beneficial effects of the data message parsing method provided by the above embodiment, and other technical features in the data message parsing device are the same as the features disclosed in the above embodiment method, which will not be repeated here.

[0075] The present application provides a data packet parsing device, which includes: at least one processor; and a memory communicatively connected to the at least one processor; wherein the memory stores instructions executable by the at least one processor, and the instructions are executed by the at least one processor so that the at least one processor can execute the data packet parsing method in the above-mentioned embodiment one.

[0076] Reference below Fig.10 , which shows a schematic diagram of the structure of a data message parsing device suitable for implementing an embodiment of the present application. The data message parsing device in the embodiment of the present application may include but is not limited to mobile terminals such as mobile phones, laptop computers, digital broadcast receivers, PDAs (Personal Digital Assistants), PADs (Portable Application Descriptions), PMPs (Portable Media Players), vehicle-mounted terminals (such as vehicle-mounted navigation terminals), etc., and fixed terminals such as digital TVs, desktop computers, etc. Fig.10 The data packet parsing device shown is merely an example and should not bring any limitation to the functions and scope of use of the embodiments of the present application.

[0077] like Fig.10 As shown, the data message parsing device may include a processing device 1001 (such as a central processing unit, a graphics processor, etc.), which can perform various appropriate actions and processes according to a program stored in a read-only memory (ROM: Read Only Memory) 1002 or a program loaded from a storage device 1003 to a random access memory (RAM: Random Access Memory) 1004. In RAM1004, various programs and data required for the operation of the data message parsing device are also stored. The processing device 1001, ROM1002 and RAM1004 are connected to each other through a bus 1005. An input / output (I / O) interface 1006 is also connected to the bus. Generally, the following systems can be connected to the I / O interface 1006: an input device 1007 including, for example, a touch screen, a touchpad, a keyboard, a mouse, an image sensor, a microphone, an accelerometer, a gyroscope, etc.; an output device 1008 including, for example, a liquid crystal display (LCD: Liquid Crystal Display), a speaker, a vibrator, etc.; a storage device 1003 including, for example, a magnetic tape, a hard disk, etc.; and a communication device 1009. The communication device 1009 can allow the data packet parsing device to communicate with other devices wirelessly or wired to exchange data. Although the figure shows a data packet parsing device with various systems, it should be understood that it is not required to implement or have all the systems shown. More or fewer systems can be implemented or provided instead.

[0078] In particular, according to the embodiments disclosed in the present application, the process described above with reference to the flowchart can be implemented as a computer software program. For example, the embodiments disclosed in the present application include a computer program product, which includes a computer program carried on a 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 a network through a communication device, or installed from a storage device 1003, or installed from a ROM 1002. When the computer program is executed by the processing device 1001, the above-mentioned functions defined in the method of the embodiment disclosed in the present application are executed.

[0079] The data message parsing device provided by the present application adopts the data message parsing method in the above embodiment to solve the technical problem of data message parsing. Compared with the prior art, the beneficial effects of the data message parsing device provided by the present application are the same as the beneficial effects of the data message parsing method provided by the above embodiment, and the other technical features in the data message parsing device are the same as the features disclosed in the method of the previous embodiment, which will not be repeated here.

[0080] It should be understood that the various parts disclosed in this application can be implemented by hardware, software, firmware or a combination thereof. In the description of the above embodiments, specific features, structures, materials or characteristics can be combined in any one or more embodiments or examples in a suitable manner.

[0081] The above is only a specific implementation of the present application, but the protection scope of the present application is not limited thereto. Any person skilled in the art who is familiar with the present technical field can easily think of changes or substitutions within the technical scope disclosed in the present application, which should be included in the protection scope of the present application. Therefore, the protection scope of the present application should be based on the protection scope of the claims.

[0082] The present application provides a computer-readable storage medium having computer-readable program instructions (ie, computer programs) stored thereon, the computer-readable program instructions being used to execute the data message parsing method in the above-mentioned embodiment.

[0083] The computer-readable storage medium provided in the present application may be, for example, a USB flash drive, but is not limited to electrical, magnetic, optical, electromagnetic, infrared, or semiconductor systems, systems or devices, or any combination of the above. More specific examples of computer-readable storage media may include, but are not limited to: an electrical connection with one or more wires, a portable computer disk, a hard disk, a random access memory (RAM: Random Access Memory), a read-only memory (ROM: Read Only Memory), an erasable programmable read-only memory (EPROM: Erasable Programmable Read Only Memory or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM: CD-Read Only Memory), an optical storage device, a magnetic storage device, or any suitable combination of the above. In this embodiment, the computer-readable storage medium may be any tangible medium containing or storing a program, which may be used by or in combination with an instruction execution system, system or device. The program code contained on the computer-readable storage medium may be transmitted using any appropriate medium, including but not limited to: wires, optical cables, RF (Radio Frequency: Radio Frequency), etc., or any suitable combination of the above.

[0084] The computer-readable storage medium may be included in the data message parsing device; or may exist independently without being assembled into the data message parsing device.

[0085] The computer-readable storage medium carries one or more programs. When the one or more programs are executed by the data packet parsing device, the data packet parsing device: Receive computing network order data, wherein the computing network order data includes a plurality of sub-order data, and the sub-order data includes a plurality of data nodes; Based on each of the data nodes, each of the sub-order data is divided by a separator to obtain an assembled data message, wherein the data nodes that do not contain slave nodes in the assembled data message are converted into node parameter values; The assembled data message is read and processed through a preset message parsing configuration, and after the reading is completed, the data objects in the computing network order data are parsed in a multi-threaded manner.

[0086] Computer program code for performing the operations of the present application may be written in one or more programming languages ​​or a combination thereof, including 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 separate software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server. In the case of 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).

[0087] The flow chart and block diagram in the accompanying drawings illustrate the possible architecture, function and operation of the system, method and computer program product according to various embodiments of the present application. In this regard, each square box in the flow chart or block diagram can represent a module, a program segment or a part of a code, and the module, the program segment or a part of the 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 square box can also occur in a sequence different from that marked in the accompanying drawings. For example, two square 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 square box in the block diagram and / or flow chart, and the combination of the square boxes in the block diagram and / or flow chart can be implemented with a dedicated hardware-based system that performs a specified function or operation, or can be implemented with a combination of dedicated hardware and computer instructions.

[0088] The modules involved in the embodiments described in this application may be implemented by software or hardware, wherein the name of the module does not constitute a limitation on the unit itself in some cases.

[0089] The readable storage medium provided in the present application is a computer-readable storage medium, which stores computer-readable program instructions (i.e., computer programs) for executing the above-mentioned data message parsing method, and can solve the technical problems of data message parsing. Compared with the prior art, the beneficial effects of the computer-readable storage medium provided in the present application are the same as the beneficial effects of the data message parsing method provided in the above-mentioned embodiment, and will not be elaborated here.

[0090] The present application also provides a computer program product, including a computer program, which implements the steps of the data message parsing method as described above when executed by a processor.

[0091] The computer program product provided by the present application can solve the technical problem of data message parsing. Compared with the prior art, the beneficial effects of the computer program product provided by the present application are the same as the beneficial effects of the data message parsing method provided by the above embodiment, which will not be repeated here.

[0092] The above descriptions are only some embodiments of the present application, and are not intended to limit the patent scope of the present application. All equivalent structural changes made using the contents of the present application specification and drawings under the technical concept of the present application, or direct / indirect applications in other related technical fields are included in the patent protection scope of the present application.< / paytype> < / payseq> < / extendinfo> < / subproductinfo> < / productorderid> < / subproductinfo> < / productinfo> < / provinfo>

Claims

1. A data message parsing method, characterized in that: The method comprises: Receive computing network order data, wherein the computing network order data includes a plurality of sub-order data, and the sub-order data includes a plurality of data nodes; Based on each of the data nodes, each of the sub-order data is divided by a separator to obtain an assembled data message, wherein the data nodes that do not contain slave nodes in the assembled data message are converted into node parameter values; The assembled data message is read and processed through a preset message parsing configuration, and after the reading is completed, the data objects in the computing network order data are parsed in a multi-threaded manner.

2. The method according to claim 1, characterized in that The step of dividing each of the sub-order data by a separator based on each of the data nodes to obtain an assembled data message includes: Determine whether a data node in each of the sub-order data has a subordinate node; If it is determined that the data node does not have a subordinate node, compressing the data in the data node into a node parameter value; If it is determined that the data node has a subordinate node, then the data tag of the data node is saved; The data label and the node parameter value are integrated through a separator to obtain an assembled data message.

3. The method according to claim 2, characterized in that The step of reading and processing the assembled data message through a preset message parsing configuration includes: Read the assembled message data segment by segment in a streaming processing manner to determine the subordinate order relationship of each of the data nodes in the assembled data message; For data nodes that have subordinate nodes, read the data content in each of the data nodes in sequence according to the subordinate order relationship and the data label; For a data node that does not have a subordinate node, a node parameter value corresponding to the data node is written into a preset algorithm instance to obtain the data content in the data node.

4. The method according to claim 1, characterized in that The step of parsing the data objects in the computing network order data in a multi-threaded manner includes: Synchronously read the data in each data node in a multi-threaded manner to obtain multiple subtask data; Placing each of the subtask data in an independent task for parsing to obtain parsed data; For each of the data nodes, each of the parsed data is written into the instance object of the parent node corresponding to the current node.

5. The method according to claim 4, characterized in that The data nodes include parameter value nodes and no parameter value nodes. The step of writing each parsed data into the instance object of the parent node corresponding to the current node for each data node includes: For the parameter value nodes, after the data parsing processing of all parameter value nodes is completed, the parsing data of the parameter value nodes that currently have no subordinate nodes are integrated to obtain a parsing data set; Writing the parsed data set into the instance object of the parent node; For a node without a parameter value, the node without a parameter value is split by the separator to obtain a plurality of first parameter values; The first parameter value is written into the instance object of the first node to which the current node belongs.

6. The method according to claim 1, characterized in that The preset message parsing configuration includes a plurality of configuration fields, wherein the configuration fields include an interface name, data node attributes, and a current node processing mode, and the configuration fields are used to synchronously read or parse the data content of each of the separated data nodes.

7. A data message parsing device, characterized in that: The data message parsing device comprises: A receiving module, used to receive computing network order data, wherein the computing network order data includes a plurality of sub-order data, and the sub-order data includes a plurality of data nodes; A partitioning module, configured to partition each of the sub-order data by a separator based on each of the data nodes to obtain an assembled data message, wherein the data nodes that do not contain a slave node in the assembled data message are converted into node parameter values; The processing module is used to read and process the assembled data message through a preset message parsing configuration, and after the reading is completed, parse the data objects in the computing network order data in a multi-threaded manner.

8. A data message parsing device, characterized in that: The device comprises: a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the computer program is configured to implement the steps of the data message parsing method according to any one of claims 1 to 6.

9. A storage medium, characterized in that: The storage medium is a computer-readable storage medium, and a computer program is stored on the storage medium. When the computer program is executed by a processor, the steps of the data message parsing method according to any one of claims 1 to 6 are implemented.

10. A computer program product, characterized in that The computer program product comprises a computer program, and when the computer program is executed by a processor, the steps of the data message parsing method according to any one of claims 1 to 6 are implemented.

Citation Information

Patent Citations

  • Service message transmission method, system and device and storage medium

    CN114244764A

  • Message generation method and device, electronic equipment and storage medium

    CN114499759A

  • Data processing method, controller and first network equipment

    CN114690680A

  • Message transmission method and device

    CN115589439A

  • Message conversion method and device, electronic equipment and computer readable storage medium

    CN116828073A