Middleware online communication method and system of MES system

The middleware module performs information format conversion and interaction between the MES system and the host computer system, solving the complex communication connection and maintenance problems between the MES system and the host computer system, realizing unified communications and online debugging, and reducing maintenance and development costs.

CN118779130APending Publication Date: 2024-10-15XIAMEN JIECHUANG AUTOMATION TECH CO LTD +1
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202410922981.9
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-07-10
Publication Date
2024-10-15

AI Technical Summary

Technical Problem

The communication connection between the existing MES system and the host computer system is complicated to maintain, resulting in multiple sub-versions of software being generated when the code is modified, which increases the difficulty of later maintenance and labor costs.

Method used

The modification information sent by the host computer system is obtained through the middleware module, converted into a visual binary tree, the configuration node is updated to generate a request message, and communicates with the MES system to achieve information format conversion and interaction, reducing the complexity of code modification and manual debugging costs. .

Benefits of technology

It realizes the unified communication connection between the host computer system and multiple MES systems, reduces the maintenance complexity and development cost, allows online debugging and modification, and avoids the generation of sub-version software.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118779130A_ABST
    Figure CN118779130A_ABST
Patent Text Reader

Abstract

The invention relates to a middleware online communication method and system of an MES system, and the method comprises the steps: updating modification information sent by an upper computer system according to a format in a preset request message template through setting middleware, generating a request message corresponding to the current MES system, and achieving the format conversion of the modification information between the upper computer system and the MES system. One upper computer system can be in communication connection with a plurality of MES systems through the middleware module and complete information interaction, online program debugging of the MES systems is achieved, the labor cost of offline debugging of the MES systems is reduced, the middleware module achieves unified format conversion and interaction of modified information, the multiple MES systems can share one middleware module, and the cost is reduced. And when modification is needed, modification can be directly carried out on the middleware module, sub-version software corresponding to the MES system does not need to be formed, and maintenance is convenient.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of computer technology, and in particular to a middleware online communication method and system for an MES system. Background Art

[0002] The MES system is a manufacturing execution system based on industrial automation, which uses computer technology, modern management technology, engineering technology and other means to manage the entire production process of an enterprise. The HTTP interface, namely the HyperText TransferProtocol interface, is a channel for data interaction and information transmission. HTTP requests usually include information such as methods, URLs, HTTP versions, HTTP headers and message bodies. The methods generally include GET, POST, PUT, DELETE, etc. The URL is the target address of the request, the HTTP header contains additional information of the request, and the message body includes data and parameters in the request.

[0003] Integration with the MES system through the HTTP interface means communicating through the HTTP protocol to achieve data interaction and information transmission between different systems. Generally speaking, when integrating with the MES system through the HTTP interface, some common data exchange formats are used, such as JSON, XML, etc. These formats are cross-language and cross-platform, allowing different systems to parse and process data.

[0004] In the process of developing the communication between the host computer software and the MES system, the MES manufacturer generally requires the host computer to use the POST method of the HTTP protocol to integrate with the MES system. In terms of data format, some use the JSON format and some use the XML format; although they are all text-based and use Unicode encoding, in terms of the difficulty of assembly and parsing, the assembly and parsing of XML must consider the child nodes and parent nodes, and the logical structure is more complex. When encountering the XML data format, the conventional practice in the past was to first reference the interface information (generally referring to the Webservice interface whose data format is XML), and then call the operation in the code. This method has the following problems: when a host computer software is deployed to customer A, it has to go through the steps: docking interface information, referencing the interface, writing the calling interface method, and debugging and verifying the program online; when deployed to customer B or customer C, the same steps must be followed. Due to the modification of the code, the three customers A, B, and C will generate three sub-versions of the software, which is not conducive to later maintenance. Summary of the invention

[0005] In view of the above problems, the present invention provides a middleware online communication method and system for an MES system, which solves the problem of complex maintenance of the communication connection between the existing MES system and the host computer system.

[0006] To achieve the above object, in a first aspect, the present invention provides a middleware online communication method of an MES system, the method comprising:

[0007] Acquire modification information sent by the host computer system, where the modification information includes at least one first modification node and a modification value corresponding to the first modification node; and

[0008] Obtain a preset request message template corresponding to the current MES system, and convert the preset request message template into a first visualized binary tree, where the first visualized binary tree includes a plurality of first configuration nodes;

[0009] In the first visual binary tree, a first configuration node to be modified is selected according to the modification information and updated, and a first configuration set is generated according to the updated first configuration node;

[0010] A request message corresponding to the current MES system is generated according to the first configuration set, and the request message is sent to the MES system.

[0011] In some embodiments, the first modification node has a first modification identifier, and the first configuration node has a first configuration identifier;

[0012] Selecting and updating the first configuration node to be modified according to the modification information in the first visual binary tree, and generating the first configuration set according to the updated first configuration node further includes:

[0013] Obtaining a first modification identifier corresponding to the first modification node and a modification value corresponding to the current first modification node;

[0014] Traversing the first configuration nodes in the first visualized binary tree, filtering out the first configuration nodes corresponding to the first configuration identifier that is the same as the first modification identifier, and recording them as first update nodes;

[0015] Update the modified value to the first update node;

[0016] The above steps are repeated until the first modification node in the modification information is updated, and a first configuration set is generated according to the multiple first update nodes.

[0017] In some embodiments, the method further comprises:

[0018] Acquire a second configuration set, where the second configuration set includes a plurality of second configuration nodes, and the second configuration nodes have a second configuration identifier; and

[0019] Acquire and parse the return message sent by the MES system to obtain return information, where the return information includes at least one second modification node and a return value corresponding to the second modification node, and the second modification node has a second modification identifier;

[0020] Filter the return value of the second modification node corresponding to the second modification identifier that is the same as the second configuration identifier in the returned information to generate a parsing result;

[0021] Send the analysis results to the host computer system.

[0022] In some embodiments, obtaining a second configuration set, where the second configuration set includes a plurality of second configuration nodes, includes:

[0023] Obtain a preset return message template corresponding to the current MES system, and generate a second visual binary tree according to the preset return message template;

[0024] Filtering out at least one second configuration node in the second visual binary tree according to a preset condition, and obtaining path information corresponding to each filtered out second configuration node, recorded as a second configuration path;

[0025] The second configuration path and the second configuration node are mapped and stored to obtain a second configuration set.

[0026] In some embodiments, the preset screening condition is configured to obtain a manually input second configuration identifier.

[0027] In some embodiments, obtaining a return message sent by the MES system, parsing the return message, and obtaining return information includes:

[0028] Deserialize the returned message to obtain path information, identification information and return values ​​of multiple second modification nodes, record the path information of the second modification node as the second modification path, and record the identification information of the second modification node as the second modification identification;

[0029] The second modification path and the return value of the second modification node are mapped and stored to generate return information.

[0030] In some embodiments, filtering the return information for the return value of the second modification node corresponding to the second modification identifier that is the same as the second configuration identifier, and generating the parsing result further includes:

[0031] Determine whether the second modification identifier is the same as the second configuration identifier, and if so, obtain the second modification path, and determine whether the second modification path is the same as the second configuration path;

[0032] If the second modification path is the same as the second configuration path, the return value of the current second modification node is mapped and stored with the current second configuration node;

[0033] Repeat the above steps until all second configuration nodes in the second configuration set are traversed to obtain a parsing result.

[0034] In a second aspect, the present invention also provides a middleware online communication system for an MES system, comprising a host computer system, a middleware module and at least one MES system, wherein the middleware module establishes a communication connection with the host computer system, and the middleware is used to execute the method described in the first aspect; at least one MES system establishes a communication connection with the middleware module through a system interface.

[0035] In some embodiments, the middleware module is configured as a DLL program under the net framework; the middleware module is configured to call the MES system interface to perform POST communication based on the HTTP protocol.

[0036] In some embodiments, the preset request message template is configured as a data text in XML format; the middleware module is configured to perform a visual assembly process based on the data text in XML format, and the visual assembly process includes:

[0037] The preset request message template is converted into a first visualized binary tree, wherein the first visualized binary tree has at least one of an interface name, a URL, a user name, a user password, a timeout period, and an ID account for calling the MES system.

[0038] Different from the prior art, in the above technical solution, by obtaining the modification information sent by the upper computer system; and obtaining the preset request message template corresponding to the current MES system, the preset request message template is converted into a first visual binary tree, and the first configuration node to be modified is selected and updated in the first visual binary tree according to the modification information, and a first configuration set is generated according to the updated first configuration node; a request message corresponding to the current MES system is generated according to the first configuration set, and the request message is sent to the MES system. By setting the middleware, the modification information sent by the host system is updated according to the format in the preset request message template, and the request message corresponding to the current MES system is generated, thereby realizing the format conversion of the modification information between the host system and the MES system. A host system can use the middleware module to communicate with multiple MES systems and complete information interaction. In addition, the setting of the middleware module can realize the online program debugging of the MES system, reducing the labor cost of offline debugging of the MES system. At the same time, the middleware module realizes the unified format conversion and interaction of the modification information. Multiple MES systems can share a middleware module. When modification is needed, it can be directly modified on the middleware module without forming a sub-version software corresponding to the MES system, which is easy to maintain.

[0039] The above-mentioned records related to the content of the invention are only an overview of the technical solution of the present invention. In order to enable ordinary technicians in the field to more clearly understand the technical solution of the present invention, and then implement it according to the text of the specification and the contents recorded in the drawings, and in order to make the above-mentioned purpose and other purposes, features and advantages of the present invention easier to understand, the following is a description in combination with the specific implementation mode of the present invention and the drawings. BRIEF DESCRIPTION OF THE DRAWINGS

[0040] The drawings are only used to illustrate the principles, implementations, applications, features and effects of the specific embodiments of the present invention and other related contents, and shall not be considered as limiting the present invention.

[0041] In the drawings of the specification:

[0042] Figure 1 A step diagram of an online communication method according to a specific embodiment of the present invention;

[0043] Figure 2 This is a step diagram of the host computer system sending modification information to the MES system in the middleware module according to a specific implementation mode of the present invention;

[0044] Figure 3 This is a step diagram of the MES system returning a message to the upper computer system in the middleware module according to a specific embodiment of the present invention;

[0045] Figure 4 A schematic diagram of a configuration submodule of a middleware module according to a specific implementation mode of the present invention;

[0046] Figure 5 A schematic diagram of a calling submodule of a middleware module according to a specific implementation mode of the present invention;

[0047] Figure 6 This is a schematic diagram of the first visualized binary tree according to a specific implementation manner of the present invention;

[0048] Figure 7 It is a schematic diagram of an online communication system according to a specific implementation mode of the present invention.

[0049] Reference numerals:

[0050] 1. Online communication system;

[0051] 11. Host computer system;

[0052] 12. Middleware module;

[0053] 121. Configuration submodule;

[0054] 122. Call submodule;

[0055] 13. MES system. DETAILED DESCRIPTION

[0056] In order to explain in detail the possible application scenarios, technical principles, specific schemes that can be implemented, and the purposes and effects of the present invention, the following is a detailed description in combination with the specific embodiments listed and the accompanying drawings. The embodiments described herein are only used to more clearly illustrate the technical solutions of the present invention, and are therefore only used as examples, and cannot be used to limit the scope of protection of the present invention.

[0057] Reference to "embodiment" herein means that the specific features, structures or characteristics described in conjunction with the embodiment may be included in at least one embodiment of the present invention. The word "embodiment" appearing in various places in the specification does not necessarily refer to the same embodiment, nor does it particularly limit its independence or association with other embodiments. In principle, in the present invention, as long as there is no technical contradiction or conflict, the various technical features mentioned in each embodiment can be combined in any way to form a corresponding implementable technical solution.

[0058] Unless otherwise defined, the technical terms used herein have the same meanings as those generally understood by those skilled in the art to which the present invention belongs; the use of relevant terms herein is only for describing specific embodiments and is not intended to limit the present invention.

[0059] In the description of the present invention, the term "and / or" is an expression used to describe the logical relationship between objects, indicating that three relationships may exist, for example, A and / or B, which means: A exists, B exists, and A and B exist at the same time. In addition, the character " / " in this article generally indicates that the objects before and after are in a logical relationship of "or".

[0060] In the present invention, terms such as "first" and "second" are merely used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any actual relationship of quantity, priority or sequence between these entities or operations.

[0061] Without further restrictions, in the present invention, the words "include", "comprises", "has" or other similar open-ended expressions used in sentences are intended to cover non-exclusive inclusion. These expressions do not exclude the presence of additional elements in the process, method or product including the elements, so that the process, method or product including a series of elements may include not only those limited elements, but also other elements not explicitly listed, or also include elements inherent to such process, method or product.

[0062] Similar to the understanding in the Examination Guidelines, in the present invention, expressions such as "greater than", "less than", "exceed" and the like are understood to exclude the number itself; expressions such as "above", "below", "within" and the like are understood to include the number itself. In addition, in the description of the embodiments of the present invention, the meaning of "multiple" is more than two (including two), and similar expressions related to "multiple" are also understood in this way, such as "multiple groups", "multiple times", etc., unless otherwise clearly and specifically limited.

[0063] See also Figures 1 to 3 , Figure 6 In a first aspect, this embodiment provides a middleware online communication method for an MES system, the method comprising:

[0064] S101, obtaining modification information sent by the host computer system, where the modification information includes at least one first modification node and a modification value corresponding to the first modification node; and

[0065] S102: Obtain a preset request message template corresponding to the current MES system, and convert the preset request message template into a first visualized binary tree, where the first visualized binary tree includes a plurality of first configuration nodes;

[0066] S103, selecting and updating a first configuration node to be modified according to the modification information in the first visual binary tree, and generating a first configuration set according to the updated first configuration node;

[0067] S104. Generate a request message corresponding to the current MES system according to the first configuration set, and send the request message to the MES system.

[0068] In step S101, the modification information sent by the host system is obtained. The modification information here can also be understood as a variable parameter set. The MES system contains constant parameters and variable parameters, wherein the variable parameters are variable, that is, the host system is allowed to schedule and modify based on actual needs. The modification information includes at least one first modification node and a modification value corresponding to the first modification node. This modification value can be the number information, status information or model change information, logical operation information, etc. of the device. Similarly, the first modification node can be a code node, a device number node, a device status node, etc. This embodiment does not impose any unnecessary restrictions on this.

[0069] In step S102, when a host computer system uses a middleware module to control multiple MES systems, Figure 2 and Figure 3As shown, the middleware module needs to write the modification information of the host system into the request messages of different MES systems. Each MES system corresponds to a preset request message template, which can also be understood as the message format template of the current MES system. The middleware module obtains the preset request message template corresponding to the current MES system. The specific acquisition process can be: calling the ID number of the current MES interface, and filtering out the preset request message template consistent with the current ID number in the pre-stored database based on the ID number. The middleware module is also used to convert the preset request message template into a first visual binary tree, such as Figure 6 As shown, the first visualized binary tree displays multiple first configuration nodes in a hierarchical tree diagram, which is convenient for the operator to view and monitor the written data records of the modified information. Further, when the modification information needs to be entered manually, it can also be completed by clicking the first configuration node in the first visualized binary tree.

[0070] In step S103, the first configuration node to be modified is screened and updated, and finally a first configuration set is obtained. The first configuration set contains the path information of the first configuration node and the updated modification value.

[0071] In step S104, the first configuration set is assembled according to the format of a preset request message template to generate a request message, and the request message is sent to the MES system. After obtaining the request message, the MES system can complete the modification of the corresponding variable parameters.

[0072] It should be noted that in Figure 2 and Figure 3 In the above, the client is the host computer system, the server is the MES system, and the middleware is the middleware module. Among them, customer A, customer B, and customer C refer to different customers. Figure 2 and Figure 3 The figure shows a schematic diagram of the process of a host computer system interacting with multiple MES systems through the same middleware module.

[0073] During this process, the host system only needs to send a modification message to the middleware module. The middleware module will select the corresponding MES system and generate a corresponding request message to complete the information interaction between the MES system and the host system. When the modification information is used in the debugging phase of the MES system, the debugging data sent by the host system does not need to rely on manual interface docking in the workplace where the MES system is located, reducing the manpower investment cost in the debugging phase. At the same time, in the subsequent maintenance process, the middleware module can be used directly online to communicate with the MES system, reducing the complexity of maintenance, realizing the interaction function between a host system and multiple MES systems, meeting actual usage needs, and reducing development costs.

[0074] See also Figure 6 , in some embodiments, the first modification node has a first modification identifier, and the first configuration node has a first configuration identifier;

[0075] Selecting and updating the first configuration node to be modified according to the modification information in the first visual binary tree, and generating the first configuration set according to the updated first configuration node further includes:

[0076] Obtaining a first modification identifier corresponding to the first modification node and a modification value corresponding to the current first modification node;

[0077] Traversing the first configuration nodes in the first visualized binary tree, filtering out the first configuration nodes corresponding to the first configuration identifier that is the same as the first modification identifier, and recording them as first update nodes;

[0078] Update the modified value to the first update node;

[0079] The above steps are repeated until the first modification node in the modification information is updated, and a first configuration set is generated according to the multiple first update nodes.

[0080] In this embodiment, the first modification node has a first modification identifier, which can be understood as a unique mark of the current first modification node, which can be a string or a digital number, and the specific embodiment can be defined according to actual needs. The first configuration node has a first configuration identifier, which can also be understood as a unique mark of the current first configuration node, and the specific embodiment of the first configuration identifier can be defined according to actual needs.

[0081] In this embodiment, there are multiple first configuration nodes in the first visual binary tree, and there is a hierarchical relationship between the multiple first configuration nodes. The first visual binary tree can concisely reflect this hierarchical relationship in the window. In the first visual binary tree, the first configuration identifier of the first configuration node is screened. When the first configuration identifier is the same as the first modification identifier, it means that the first configuration node corresponding to the first configuration identifier is the same as the first modification node corresponding to the first modification identifier. For ease of expression, the first configuration node is recorded as the first update node. At the same time, the modification value of the first modification node is updated to the first update node, and the update operation of the modification value is completed.

[0082] In this embodiment, the matching operation of the first modification identifier and the first configuration identifier is repeated, and when the match is successful, the modification value is updated to the corresponding first update node until all the multiple first modification nodes included in the modification information are updated, and the updated first update node generates the first configuration set.

[0083] The above embodiment shows the specific process of the request message in the configuration stage. Figure 4 As shown, the request message assembly process includes obtaining a preset request message template, converting the preset request message template into a first visual binary tree, and configuring it. The configuration process is also the aforementioned step. The first configuration node and the first modification node are used to screen out the first configuration nodes that need to be updated one by one, recorded as the first update node, and then the first update node is integrated into the first configuration set. The final request message is assembled according to the first configuration set and sent to the MES system to complete the interaction between the host system and the MES system.

[0084] See also Figures 3 to 5 In some embodiments, the method further comprises:

[0085] Acquire a second configuration set, where the second configuration set includes a plurality of second configuration nodes, and the second configuration nodes have a second configuration identifier; and

[0086] Acquire and parse the return message sent by the MES system to obtain return information, where the return information includes at least one second modification node and a return value corresponding to the second modification node, and the second modification node has a second modification identifier;

[0087] Filter the return value of the second modification node corresponding to the second modification identifier that is the same as the second configuration identifier in the returned information to generate a parsing result;

[0088] Send the analysis results to the host computer system.

[0089] The method steps shown in this embodiment are applicable to the processing flow of the middleware when the MES system returns a message. In some application scenarios, the host system needs to obtain a parameter value of a certain MES system in order to monitor the operating status of the MES system. However, the message sent by the MES system cannot be recognized by the host system. To solve this problem, the middleware shown in this embodiment is also used to parse the return message returned by the MES system to obtain the return value required by the host system, which is convenient for subsequent operations.

[0090] In this embodiment, the second configuration set includes multiple second configuration nodes. The second configuration node has a second configuration identifier. The second configuration identifier can be understood with reference to the aforementioned first configuration identifier. The second configuration identifier is a unique mark of the second configuration node.

[0091] When it is necessary to know the status of the MES system, the host computer system can send a status acquisition instruction. After receiving this instruction, the MES system will generate a return message and send it to the middleware module. The middleware module parses the received return message to obtain return information, which includes at least one second modification node and the return value corresponding to the second modification node. Here, the second modification node can be understood as all nodes that the current MES system can allow to change, and the return value can be understood as the node status of all nodes that are allowed to change in the current MES system. For example, 1 indicates a successful change, -1 indicates a failed change, and 0 indicates that the change cannot be made. The return value is ±1 or 0. The specific return value setting can be set according to actual needs, and this embodiment does not limit this.

[0092] After obtaining the return message sent by the MES system, the middleware module parses the return message to obtain the return information, matches the second modification node in the return information with the second configuration node in the second configuration set, and when there is a second modification node whose second configuration identifier is the same as the second modification identifier, it means that the second modification node and the second configuration node are the same node, and the return value corresponding to the second modification node is mapped and stored with the current second configuration node, the collection of the required return values ​​of the second configuration node is completed, and the parsing result is generated.

[0093] The parsing result is stored in the form of a string, for example, it can be stored in the form of a JOSN string and then sent to the host computer system. The host computer system then recognizes the parsing result of the required MES system, facilitating subsequent operations.

[0094] This embodiment shows the specific operation steps of the middleware module when the MES system sends a return message, so that the return information in the return message sent by the MES system can be recognized by the host computer system. When there are multiple MES systems, this step facilitates the host computer system to obtain data from multiple MES systems in a timely manner, thereby improving debugging efficiency.

[0095] See also Figure 4 and Figure 5 In some embodiments, obtaining a second configuration set, the second configuration set including a plurality of second configuration nodes includes:

[0096] Obtain a preset return message template corresponding to the current MES system, and generate a second visual binary tree according to the preset return message template;

[0097] Filtering out at least one second configuration node in the second visual binary tree according to a preset condition, and obtaining path information corresponding to each filtered out second configuration node, recorded as a second configuration path;

[0098] The second configuration path and the second configuration node are mapped and stored to obtain a second configuration set.

[0099] In some embodiments, the preset screening condition is configured to obtain a manually input second configuration identifier.

[0100] In this embodiment, a preset return message template corresponding to the current MES system is obtained, and the preset return message template is converted into a second visual binary tree. Similar to the first visual binary tree, the second visual binary tree lists the hierarchical relationship of multiple second configuration nodes. By setting preset conditions, the second configuration nodes are screened, and the path information of the second configuration nodes is obtained at the same time, recorded as the second configuration path, and the second configuration path is mapped and stored with the second configuration node to obtain the second configuration set.

[0101] It should be noted that the preset condition can be pre-input, and the middleware module automatically filters according to the pre-input filtering condition. The preset condition can also be the user's online manual debugging. For example, when the middleware module has a window display function, the second visual binary tree can be displayed in the window, and a filtering window is set at the same time. The user can filter out the second configuration node that needs to be parsed in the second visual binary tree and select it into the filtering window. The specific method can be to manually input the second configuration identifier corresponding to the second configuration node. After the screening is completed, the selected second configuration node is exported from the filtering window to form a second configuration set.

[0102] In some embodiments, obtaining a return message sent by the MES system, parsing the return message, and obtaining return information includes:

[0103] Deserialize the returned message to obtain path information, identification information and return values ​​of multiple second modification nodes, record the path information of the second modification node as the second modification path, and record the identification information of the second modification node as the second modification identification;

[0104] The second modification path and the return value of the second modification node are mapped and stored to generate return information. This embodiment shows the parsing process of the return message, and the path information, identification information and return value of multiple second modification nodes can be parsed from the return message in the form of deserialization processing, and the second modification path and the return value of the second modification node are mapped and stored to generate return information.

[0105] Furthermore, in some embodiments, filtering the return value of the second modification node corresponding to the second modification identifier that is the same as the second configuration identifier in the returned information, and generating the parsing result further includes:

[0106] Determine whether the second modification identifier is the same as the second configuration identifier, and if so, obtain the second modification path, and determine whether the second modification path is the same as the second configuration path;

[0107] If the second modification path is the same as the second configuration path, the return value of the current second modification node is mapped and stored with the current second configuration node;

[0108] Repeat the above steps until all second configuration nodes in the second configuration set are traversed to obtain a parsing result.

[0109] After obtaining the second configuration set, the second configuration identifier needs to be matched with the second modification node one by one. The specific matching process may be to first select the second modification node and the second configuration node with the same tag information through the second modification identifier and the second configuration identifier, and then introduce the path matching step, that is, on the premise that the second configuration identifier and the second modification identifier are consistent, further match the second configuration path and the second modification path. When the second configuration path and the second modification path are consistent, it can be determined that the current second modification node and the second configuration node are the same node, and then the return value of the second modification node is mapped and stored with the second configuration node to generate a parsing result. This method can achieve accurate pairing of the second modification node and the second configuration node, and improve the accuracy of the parsing result.

[0110] See also Figure 4 , Figure 5 and Figure 7 In the second aspect, the present embodiment further provides a middleware online communication system 1 of an MES system 13, comprising a host computer system 11, a middleware module 12 and at least one MES system 13, wherein the middleware module 12 establishes a communication connection with the host computer system 11, and the middleware is used to execute the method described in the first aspect; at least one MES system 13 establishes a communication connection with the middleware module 12 through a system interface. The nouns shown in this embodiment can be understood with reference to the aforementioned text.

[0111] In this embodiment, the middleware module 12 includes a configuration submodule 121 and a calling submodule 122. The configuration submodule 121 is used to execute the generation process of the request message and the parsing process of the return message. Figure 4 and Figure 5 As shown, the calling submodule 122 is a DLL program, which can be used by the host computer system 11 to control the middleware module 12 to execute corresponding logical ideas.

[0112] Specifically, in some embodiments, the middleware module 12 is configured as a DLL program under the net framework, which can store the interface information, request message templates and return message templates, assembly logic and parsing logic of the MES system 13. The middleware module 12 is configured to call the MES system 13 interface to perform POST communication based on the HTTP protocol.

[0113] In some embodiments, the preset request message template is configured as a data text in XML format; the middleware module 12 is configured to perform a visual assembly process based on the data text in XML format, and the visual assembly process includes:

[0114] The preset request message template is converted into a first visualized binary tree, wherein the first visualized binary tree has at least one item of an interface name, a URL, a user name, a user password, a timeout period, and an ID account for calling the MES system 13 .

[0115] The system shown in this embodiment has the following advantages: when a host computer system 11 is deployed to different customers, the use of middleware can reduce or avoid code changes in the host computer system 11; only the configuration operation of the middleware module 12 is required to configure the data format text required by the MES system 13; the middleware uploads data to the MES system 13, and parses and returns the data of the MES system 13 to the host computer system 11; at least 80% of the application scenarios are met, and the stability of the host computer system 11 is increased compared with the previous method, and the generation of program sub-versions associated with the MES system 13 is reduced, while also reducing manpower investment and travel expenses.

[0116] In the above technical solution, by obtaining the modification information sent by the upper computer system; and obtaining the preset request message template corresponding to the current MES system, the preset request message template is converted into a first visual binary tree, and the first configuration node to be modified is selected and updated in the first visual binary tree according to the modification information, and a first configuration set is generated according to the updated first configuration node; a request message corresponding to the current MES system is generated according to the first configuration set, and the request message is sent to the MES system. By setting the middleware, the modification information sent by the host system is updated according to the format in the preset request message template, and the request message corresponding to the current MES system is generated, thereby realizing the format conversion of the modification information between the host system and the MES system. A host system can use the middleware module to communicate with multiple MES systems and complete information interaction. In addition, the setting of the middleware module can realize the online program debugging of the MES system, reducing the labor cost of offline debugging of the MES system. At the same time, the middleware module realizes the unified format conversion and interaction of the modification information. Multiple MES systems can share a middleware module. When modification is needed, it can be directly modified on the middleware module without forming a sub-version software corresponding to the MES system, which is easy to maintain.

[0117] Finally, it should be noted that although the above embodiments have been described in the specification and drawings of the present invention, the patent protection scope of the present invention cannot be limited thereby. All technical solutions generated by replacing or modifying equivalent structures or equivalent processes based on the essential concept of the present invention and using the contents recorded in the specification and drawings of the present invention, as well as directly or indirectly implementing the technical solutions of the above embodiments in other related technical fields, are included in the patent protection scope of the present invention.

Claims

1. A middleware online communication method for an MES system, characterized in that: The method comprises: Acquire modification information sent by the host computer system, wherein the modification information includes at least one first modification node and a modification value corresponding to the first modification node; and Obtaining a preset request message template corresponding to the current MES system, and converting the preset request message template into a first visual binary tree, where the first visual binary tree includes a plurality of first configuration nodes; In the first visual binary tree, according to the modification information, a first configuration node to be modified is selected and updated, and a first configuration set is generated according to the updated first configuration node; A request message corresponding to the current MES system is generated according to the first configuration set, and the request message is sent to the MES system.

2. The middleware online communication method of the MES system according to claim 1, characterized in that: The first modification node has a first modification identifier, and the first configuration node has a first configuration identifier; Selecting and updating a first configuration node to be modified according to the modification information in the first visual binary tree, and generating a first configuration set according to the updated first configuration node further includes: Obtaining a first modification identifier corresponding to a first modification node and a modification value corresponding to the current first modification node; Traversing the first configuration nodes in the first visual binary tree, filtering out the first configuration nodes corresponding to the first configuration identifier that is the same as the first modification identifier, and recording them as first update nodes; Updating the modified value into the first update node; Repeat the above steps until the first modification node in the modification information is updated, and generate the first configuration set according to the plurality of first update nodes.

3. The middleware online communication method of the MES system according to claim 1, characterized in that: The method further comprises: Acquire a second configuration set, where the second configuration set includes a plurality of second configuration nodes, and the second configuration nodes have a second configuration identifier; and Acquire and parse a return message sent by the MES system to obtain return information, where the return information includes at least one second modification node and a return value corresponding to the second modification node, where the second modification node has a second modification identifier; Filter the return value of the second modification node corresponding to the second modification identifier that is the same as the second configuration identifier in the returned information to generate a parsing result; The analysis result is sent to the host computer system.

4. The middleware online communication method of the MES system according to claim 3, characterized in that: Obtain a second configuration set, where the second configuration set includes a plurality of second configuration nodes including: Obtain a preset return message template corresponding to the current MES system, and generate a second visual binary tree according to the preset return message template; Filtering out at least one second configuration node in the second visual binary tree according to a preset condition, and obtaining path information corresponding to each filtered out second configuration node, recorded as a second configuration path; The second configuration path and the second configuration node are mapped and stored to obtain the second configuration set.

5. The middleware online communication method of the MES system according to claim 4, characterized in that: The preset screening condition is configured to obtain the second configuration identifier that is manually input.

6. The middleware online communication method of the MES system according to claim 4, characterized in that: Obtain the return message sent by the MES system, parse the return message, and obtain the return information including: Deserialize the return message to obtain path information, identification information, and return values ​​of multiple second modification nodes, record the path information of the second modification node as the second modification path, and record the identification information of the second modification node as the second modification identification; The second modification path and the return value of the second modification node are mapped and stored to generate the return information.

7. The middleware online communication method of the MES system according to claim 6, characterized in that: Filtering the return value of the second modification node corresponding to the second modification identifier that is the same as the second configuration identifier in the returned information, and generating the parsing result further includes: Determine whether the second modification identifier is the same as the second configuration identifier, and if so, obtain the second modification path, and determine whether the second modification path is the same as the second configuration path; If the second modification path is the same as the second configuration path, mapping and storing the return value of the current second modification node and the current second configuration node; Repeat the above steps until all second configuration nodes in the second configuration set are traversed to obtain the parsing result.

8. A middleware online communication system for an MES system, characterized in that: include: Host computer system; A middleware module, which establishes a communication connection with the host computer system, and the middleware is used to execute the method described in any one of claims 1 to 7; At least one MES system establishes a communication connection with the middleware module via a system interface.

9. The middleware online communication system of the MES system according to claim 8, characterized in that: The middleware module is configured as a DLL program under the net framework; The middleware module is configured to call the MES system interface to perform POST communication based on the HTTP protocol.

10. The middleware online communication system of the MES system according to claim 9, characterized in that: The preset request message template is configured as a data text in XML format; The middleware module is configured to perform a visual assembly process based on the data text in XML format, and the visual assembly process includes: The preset request message template is converted into a first visualized binary tree, wherein the first visualized binary tree has at least one of an interface name, a URL, a user name, a user password, a timeout period, and an ID account for calling the MES system.