Automatic development method of service agent module and related equipment

Through the automated development method of service agent modules, the problems of low development efficiency and quality in the increase in service agent demand in automobile electrification and intelligence have been solved, and the code automation generation and development efficiency have been significantly improved.

CN119557016APending Publication Date: 2025-03-04VOYAH AUTOMOBILE TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202410863386.2
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-06-29
Publication Date
2025-03-04

AI Technical Summary

Technical Problem

In the process of electrification and intelligence of automobiles, the central domain controller undertakes a large number of service agent tasks, resulting in problems such as a huge increase in service agent demand, huge development tasks, low development efficiency and uneven development quality.

Method used

A service agent module automation development method is proposed. By creating a software architecture based on the application-based service agent needs, generating an extensible markup language format file, further generating a total table of service agent elements, sending module codes and receiving module codes, realizing automatic code generation.

Benefits of technology

It improves the efficiency of sorting and extracting service agent requirements, greatly improves the efficiency of software development, avoids errors during manual sorting and extraction, and significantly improves the quality of software development.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119557016A_ABST
    Figure CN119557016A_ABST
Patent Text Reader

Abstract

The invention provides a service agent module automatic development method and related equipment, and relates to the technical field of automobile domain controllers, and the method comprises the steps: creating a software architecture of a service agent module based on a service agent demand of an application, so as to generate a corresponding extensible markup language format file; generating a service agent element general table based on the service interface mapping table, the communication service matrix and the extensible markup language format file; generating a service agent sending module code based on the service agent element general table and the sending function template; and generating a service agent receiving module code based on the service agent element general table and the receiving function template. Therefore, the Python is used for performing automatic extraction and code automatic generation on the XML data of the inter-core service agent module, the service agent demand carding and extraction efficiency is improved, the software development efficiency is greatly improved, meanwhile, errors occurring during manual carding and extraction are avoided, and the software development quality is greatly improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of automobile domain controllers, and more specifically, to a service proxy module automatic development method, a service proxy module automatic development device, an electronic device and a storage medium. Background Art

[0002] With the in-depth development of automobile electrification and intelligence, the traditional distributed electronic and electrical architecture has gradually shifted to a centralized electronic and electrical architecture, in which the central domain controller plays the role of the core brain. It not only integrates a large number of application software such as body domain control software, vehicle control software, and power domain software, but also has powerful CAN, LIN, Ethernet and other communication capabilities. It also undertakes the tasks of signal routing, forwarding, and service agency for large amounts of data.

[0003] However, while it brings conveniences such as improved software integration and reduced development costs, it also brings many problems such as a huge increase in demand for service agents, huge development tasks, low development efficiency and low development quality.

[0004] Therefore, a new technical solution is urgently needed to solve the above technical problems. Summary of the invention

[0005] A series of simplified concepts are introduced in the Summary of the Invention, which will be further described in detail in the Detailed Description of the Invention. The Summary of the Invention does not mean to attempt to define the key features and essential technical features of the claimed technical solution, nor does it mean to attempt to determine the scope of protection of the claimed technical solution.

[0006] In a first aspect, the present invention proposes a service proxy module automated development method, comprising:

[0007] Based on the service proxy requirements of the application, create a software architecture of the service proxy module to generate the corresponding XML format file;

[0008] Generate a service proxy element summary table based on the service interface mapping table, the communication service matrix and the extensible markup language format file;

[0009] Generate service proxy sending module code based on the service proxy element master list and sending function template;

[0010] Generate the service proxy receiving module code based on the service proxy element master list and receiving function template.

[0011] Optionally, based on the service proxy requirements of the application, a software architecture of the service proxy module is created to generate a corresponding extensible markup language format file, including:

[0012] Create a request interface and an external service interface of the service proxy module, wherein the request interface is used to read the business information of the application, and the external service interface is used for the application to read the data information of the service proxy module;

[0013] Generate an Extensible Markup Language format file based on business information and data information.

[0014] Optionally, based on the service interface mapping table, the communication service matrix and the extensible markup language format file, a service proxy element summary table is generated, including:

[0015] Extracting elements based on the Extensible Markup Language format file to establish a first list, wherein the first list includes a plurality of first elements, and each first element includes a plurality of first element data;

[0016] Extracting elements from all information in the service interface mapping table to establish a second list, wherein the second list includes a plurality of second elements, and each second element includes a plurality of second element data;

[0017] The first list is respectively queried and compared with the second list and the communication service matrix for element data, so as to generate a corresponding service proxy element summary table based on the corresponding query and comparison results.

[0018] Optionally, the first list is respectively queried and compared with the second list and the communication service matrix for element data, so as to generate a corresponding service proxy element summary table based on the corresponding query and comparison results, including:

[0019] querying in the second list whether there is second element data identical to the first element data in the first list to obtain a first query result, wherein, if the first query result indicates that the first identical data exists, changing the value of the corresponding first element data to the value of the second element data, and generating a first error signal if the first query result indicates that the first identical data does not exist;

[0020] Querying whether there is first element data identical to second element data in the second list in the first list to obtain a second query result, wherein if the second query result indicates that second identical data exists, continue to query the next first element data until all first element data are queried, and if the second query result indicates that second identical data does not exist, generate a second error signal;

[0021] Traversing the first element in the first list to query whether there is first element data identical to the third element data in the communication service matrix in the first list, and then obtaining a third query result, wherein, if the third query result indicates that there is third identical data, the value of the corresponding first element data is changed to the value of the third element data, and if the third query result indicates that there is no third identical data, a third error signal is generated;

[0022] The first elements in the first list are grouped and sorted according to a preset rule to generate a total list of service proxy elements.

[0023] Optionally, based on the service proxy element master list and the sending function template, a service proxy sending module code is generated, including:

[0024] Generate a third list based on the sent page data in the service proxy element master list, wherein the third list includes a plurality of third elements, and each third element includes a plurality of third element data;

[0025] Replacing corresponding data variables in a sending function template with the third element data to generate a sending function dynamic code, wherein the sending function template includes a sending function static code;

[0026] Generate the service proxy receiving module code based on the service proxy element list and receiving function template, including:

[0027] Generate a fourth list based on the received page data in the service proxy element total list, wherein the fourth list includes a plurality of fourth elements, and each fourth element includes a plurality of fourth element data;

[0028] The fourth element data is used to replace the corresponding data variable in the receiving function template to generate the receiving function dynamic code, wherein the receiving function template includes the receiving function static code.

[0029] Optionally, the method further comprises:

[0030] Generate maintenance and testing code for the service proxy log module based on the service proxy element summary table.

[0031] Optionally, based on the service proxy element summary table, a service proxy log module maintenance and testing code is generated, including:

[0032] Based on the service proxy element summary table, generating a fifth list, wherein the fifth list includes a plurality of fifth elements, and each fifth element includes a plurality of fifth element data;

[0033] The fifth element data is used to replace the corresponding data variables in the log code template to generate the service agent log module maintenance code.

[0034] In the second aspect, a service proxy module automatic development device is also proposed, including:

[0035] An architecture creation module, used to create a software architecture of a service proxy module based on the service proxy requirements of the application, so as to generate a corresponding extensible markup language format file;

[0036] A first generating module is used to generate a service proxy element summary table based on the service interface mapping table, the communication service matrix and the extensible markup language format file;

[0037] A second generating module, for generating a service proxy sending module code based on the service proxy element master list and the sending function template;

[0038] The third generating module is used to generate the service agent receiving module code based on the service agent element master list and the receiving function template.

[0039] In a third aspect, an electronic device is also proposed, including a processor and a memory, wherein the memory stores computer program instructions, and the computer program instructions are used by the processor to execute the service agent module automation development method as described above when the processor is running.

[0040] In a fourth aspect, a storage medium is also proposed, on which program instructions are stored, and the program instructions are used to execute the service proxy module automated development method as described above when running.

[0041] According to the above technical solution, based on the service proxy requirements of the application, the software architecture of the service proxy module is created to generate the corresponding extensible markup language format file; based on the service interface mapping table, the communication service matrix and the extensible markup language format file, the service proxy element master table is generated; based on the service proxy element master table and the sending function template, the service proxy sending module code is generated; based on the service proxy element master table and the receiving function template, the service proxy receiving module code is generated. Therefore, EA software is used to develop the software architecture, demand management and XML export of the inter-core service proxy module, Python is used to automatically extract the XML data of the inter-core service proxy module, and the services that need to be proxied are classified by sending and receiving, and template encapsulation is performed, and combined with the extracted data information, the code is automatically generated, which improves the efficiency of combing and extracting service proxy requirements, greatly improves the efficiency of software development, and avoids the errors that occur during manual combing and extraction, and also greatly improves the quality of software development.

[0042] The service proxy module automated development method of the present invention, and other advantages, objectives and features of the present invention will be partially reflected through the following description, and will also be partially understood by those skilled in the art through research and practice of the present invention. BRIEF DESCRIPTION OF THE DRAWINGS

[0043] 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.

[0044] 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.

[0045] Various other advantages and benefits will become apparent to those of ordinary skill in the art by reading the detailed description of the exemplary embodiments below. The accompanying drawings are only for the purpose of illustrating exemplary embodiments and are not to be considered as limiting the present application. Also, the same reference symbols are used throughout the accompanying drawings to represent the same components. In the accompanying drawings:

[0046] Figure 1 A schematic flow chart of a method for automated development of a service proxy module according to an embodiment of the present invention is shown;

[0047] Figure 2 A schematic diagram showing a partial service proxy element summary table according to an embodiment of the present invention;

[0048] Figure 3 A schematic block diagram showing a device for automatically developing a service proxy module according to an embodiment of the present invention; and

[0049] Figure 4 A schematic block diagram of an electronic device according to an embodiment of the present invention is shown. DETAILED DESCRIPTION

[0050] In order to more clearly understand the above-mentioned purposes, features and advantages of the present application, the scheme of the present application will be further described below. It should be noted that the embodiments of the present application and the features in the embodiments can be combined with each other without conflict.

[0051] The terms "first", "second", "third", "fourth", etc. (if any) in the specification and claims of the present application and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence. It should be understood that the data used in this way can be interchangeable where appropriate, so that the embodiments described herein can be implemented in an order other than that illustrated or described herein. In addition, the terms "including" and "having" and any of their variations are intended to cover non-exclusive inclusions, for example, a process, method, system, product or device that includes a series of steps or units is not necessarily limited to those steps or units that are clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or devices. The technical solutions in the embodiments of the present application will be clearly and completely described below in conjunction with the drawings in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, rather than all of the embodiments.

[0052] In the following description, many specific details are set forth to facilitate a full understanding of the present application, but the present application may also be implemented in other ways different from those described herein; obviously, the embodiments in the specification are only part of the embodiments of the present application, rather than all of the embodiments.

[0053] In order to solve the above technical problems, according to the first aspect of the present application, a service proxy module automated development method is proposed. Figure 1 FIG. 1 is a schematic flow chart of a method 100 for automatically developing a service proxy module according to an embodiment of the present invention. Figure 1 As shown, method 100 may include the following steps.

[0054] Step S110: creating a software architecture of a service proxy module based on the service proxy requirements of the application to generate a corresponding extensible markup language format file.

[0055] Exemplarily, a software architecture of a service proxy module can be created in an enterprise architecture software (Enterprise Architecture, EA) according to service proxy requirements, wherein the service proxy module is deployed in the M core of a central domain controller and performs two-way communication and interaction with multiple applications (APPs) in the M core. Specifically, the service proxy module can read relevant information from the application end, and vice versa, the application can also read relevant information from the service proxy module end. After reading, each performs data processing internally, and then the other party can read new information. Based on the information read by both, a related extensible markup language format (XML) file can be exported. It should be noted that the XML file can be divided into two parts for storage, namely, the XML file of the service proxy module and the XML files of multiple applications. Specifically, the corresponding XML file can be exported according to development requirements. Since this application is developed for the service proxy module, the XML file of the service proxy module is exported here.

[0056] Step S120: Generate a service proxy element summary table based on the service interface mapping table, the communication service matrix and the extensible markup language format file.

[0057] For example, the service proxy element summary table can be generated by a Python data processing script according to the service interface mapping table and the communication service matrix provided by the demander, combined with the XML file exported in the aforementioned step S110. Specifically, the following Python data processing script can be used for implementation:

[0058] "if__name__=='__main__':

[0059] print('MAIN:start to build core excel!')

[0060] print('MAIN:...')

[0061] cmd=r'. / Src / handle.py'

[0062] os.system('python{}'.format(cmd))

[0063] time.sleep(2)".

[0064] Optionally, the service interface mapping table, communication service matrix and XML file can all be used as input files in the embodiments of the present application, and can be stored in the same folder, which is named "Input". The Input folder may include multiple subfolders, such as "excel", which is used to store the service interface mapping tables of multiple applications, and "xml" is used to store XML files exported by EA. The Input folder may also include files in table (Excel) format, such as the communication service matrix, which is named SOMEIP_ServiceTable_V1.0.0_S32G_Acore.

[0065] Step S130: Generate a service agent sending module code based on the service agent element list and the sending function template.

[0066] Exemplarily, the sending function template can also be used as an input file in the embodiment of the present application together with the service interface mapping table, the communication service matrix and the XML file, and stored together in the "Input" folder. Specifically, the sending function template file is stored in a folder and named "send_module". The "send_module" folder is stored in the "Input" folder. The service agent sending module code can be automatically generated by the Python sending module generation script. Specifically, the following Python sending module generation script can be used:

[0067] "print('MAIN:start to build send file!')

[0068] print('MAIN:....)

[0069] cmd=r'. / Src / send.py'

[0070] os.system('python{}'.format(cmd))

[0071] time.sleep(1)"

[0072] Step S140: Generate a service agent receiving module code based on the service agent element list and the receiving function template.

[0073] Exemplarily, the receiving function template can also be used as an input file in the embodiment of the present application together with the service interface mapping table, the communication service matrix and the XML file, and stored together in the "Input" folder. Specifically, the receiving function template file and the function framework can be stored in a folder and named "recv_module". The "recv_module" folder is stored in the "Input" folder. The service agent receiving module code can be automatically generated by the Python receiving module generation script. Specifically, the following Python receiving module generation script can be used:

[0074] "print('MAIN:start to build receive file!')

[0075] print('MAIN:...')

[0076] cmd=r'. / Src / receive.py'

[0077] os.system('python{}'.format(cmd))

[0078] time.sleep(1)"

[0079] The rapid development of the software can be completed by running the above data processing script, sending module generation script, and receiving module generation script in sequence.

[0080] According to the above technical solution, based on the service proxy requirements of the application, the software architecture of the service proxy module is created to generate the corresponding extensible markup language format file; based on the service interface mapping table, the communication service matrix and the extensible markup language format file, the service proxy element master table is generated; based on the service proxy element master table and the sending function template, the service proxy sending module code is generated; based on the service proxy element master table and the receiving function template, the service proxy receiving module code is generated. Therefore, EA software is used to develop the software architecture, demand management and XML export of the inter-core service proxy module, Python is used to automatically extract the XML data of the inter-core service proxy module, and the services that need to be proxied are classified by sending and receiving, and template encapsulation is performed, and combined with the extracted data information, the code is automatically generated, which improves the efficiency of combing and extracting service proxy requirements, greatly improves the efficiency of software development, and avoids the errors that occur during manual combing and extraction, and also greatly improves the quality of software development.

[0081] Optionally, the method may further include: step S150, generating a service agent log (LOG) module maintenance and testing code based on the service agent element summary table.

[0082] For example, the Python LOG module can be used to generate scripts to automatically generate the service agent LOG module maintenance code. Specifically, the Python LOG module can be used to generate scripts to achieve:

[0083] "print('MAIN:start to build xcp log file!')

[0084] print('MAIN:...')

[0085] cmd=r'. / Src / log.py'

[0086] os.system('python{}'.format(cmd))".

[0087] In this way, errors during program operation can be recorded, which makes it easier to track and locate problems and reduce debugging and maintenance costs.

[0088] Optionally, step S110 may create a software architecture of a service proxy module based on the service proxy requirements of the application to generate a corresponding extensible markup language format file, which may include:

[0089] Step S111, creating a request interface and an external service interface of the service proxy module, wherein the request interface is used to read the business information of the application, and the external service interface is used for the application to read the data information of the service proxy module.

[0090] For example, a SWC component of a service proxy module is created in the EA software, and a request interface (Required Interface) of the service proxy module is created to "consume" the corresponding business information (operation) in the external service interface (External Service Interface) of the application end with the same name as the request interface. Here, "consumption" means introducing the application's operation into the code of the service proxy module for use. Similarly, an external service interface and data type of the service proxy module can also be created for "consumption" by the service proxy demander (application).

[0091] Step S112: Generate an extensible markup language format file based on the business information and the data information.

[0092] According to the above step S111, the operation of the service agent demander and the data information of the service agent module can be obtained respectively, based on which the corresponding XML files can be exported respectively, wherein the XML files can include elements such as interface type, operation name, data name, data type and data flow direction.

[0093] Therefore, EA software is used to develop the software architecture, demand management and XML export of the inter-core service proxy module, and Python is used to automatically extract the XML data of the inter-core service proxy module, which improves the efficiency of service proxy demand combing and extraction, and avoids errors that occur during manual combing and extraction.

[0094] Optionally, step S120 may include generating a service proxy element summary table based on the service interface mapping table, the communication service matrix, and the extensible markup language format file:

[0095] Step S121: extracting elements based on the extensible markup language format file to establish a first list, wherein the first list includes a plurality of first elements, and each first element includes a plurality of first element data.

[0096] Exemplarily, in the above data processing script, the elements carried by all interfaces in the XML file exported in the above step S110 are extracted to establish a first list, wherein each element in the first list includes first element data {portName, serviceName, portType, dataName, dataType, serviceID, methodID}.

[0097] Step S122: extracting elements from all information in the service interface mapping table to establish a second list, wherein the second list includes a plurality of second elements, and each second element includes a plurality of second element data.

[0098] Similarly, information in all service interface mapping tables may be extracted to create a second list, wherein each element in the second list includes second element data {portName, serviceName}.

[0099] Step S123: perform element data query and comparison on the first list, the second list and the communication service matrix respectively, so as to generate a corresponding service proxy element summary table based on the corresponding query and comparison results.

[0100] Exemplarily, the first element data in the first list can be queried and compared with the second element data in the second list to determine whether the two have the same data. If so, the first element data in the first list can be corrected. Similarly, the first element data in the first list can be queried and compared with the element data in the communication service matrix to determine whether the two have the same data. If so, the first element data in the first list can also be corrected using the communication service matrix. The corrected first element data can be sorted according to preset conditions to obtain a service proxy element master table. The specific sorting method is not expanded here. Any reasonable master table data arrangement method is within the protection scope of this application.

[0101] As a result, proxy requirements can be automatically checked during data processing, greatly reducing software development risks caused by errors and omissions in requirements.

[0102] Optionally, step S123 performs element data query and comparison on the first list, the second list and the communication service matrix respectively, so as to generate a corresponding service proxy element summary table based on corresponding query and comparison results, which may include:

[0103] Step S123a, queries in the second list whether there is second element data that is identical to the first element data in the first list to obtain a first query result, wherein when the first query result indicates that the first identical data exists, the value of the corresponding first element data is changed to the value of the second element data, and when the first query result indicates that the first identical data does not exist, a first error signal is generated.

[0104] Exemplarily, it is possible to query in the second list whether the portName of each element in the first list exists. If so, the serviceName corresponding to the portName in the second list can be assigned to the serviceName corresponding to the portName in the first list; if not, a first error signal "The service interface mapping table is missing the portName" can be generated, and the service interface mapping table can be changed at this time.

[0105] Step S123b, querying whether there is first element data identical to the second element data in the second list in the first list to obtain a second query result, wherein, if the second query result indicates that there is second identical data, continue to query the next first element data until all first element data are queried, and if the second query result indicates that there is no second identical data, generate a second error signal.

[0106] Exemplarily, you can query whether the portName of each element in the second list exists in the first list. If it does, you can continue to query the portName of the next element. If it does not exist, generate a second error signal "The interface is missing in XML", and then you can build the missing interface in the EA software.

[0107] Step S123c, traverse the first element in the first list to query whether there is first element data in the first list that is identical to the third element data in the communication service matrix, and then obtain a third query result, wherein, when the third query result indicates that there is third identical data, the value of the corresponding first element data is changed to the value of the third element data, and when the third query result indicates that there is no third identical data, a third error signal is generated.

[0108] Exemplarily, it is possible to traverse the serviceName of all elements in the first list to see whether they exist in the communication service matrix. If so, the corresponding third element data serviceID and methodID in the communication service matrix can be extracted and the corresponding values ​​can be assigned to the serviceID and methodID corresponding to the elements in the first list. If not, a third error signal "This service does not exist in the communication service matrix" is generated.

[0109] Step S123d: group and sort the first elements in the first list according to a preset rule to generate a total list of service proxy elements.

[0110] After reassigning the first element data according to the above method, all elements in the first list can be traversed, and the elements can be divided into two categories: "send" and "receive", and the grouped elements can be arranged in the form of a table, wherein the headers of the two tables "send" and "receive" include: serviceID, methodID, PortName, DataName, DataType. Specifically, the elements can be arranged in order from large to small or from small to large based on the size of serviceID or methodID, and then the relevant content can be filled in sequence. Figure 2 FIG. 4 is a schematic diagram showing a partial service proxy element summary table according to an embodiment of the present invention. Figure 2 As shown, the "send" table is generated by arranging the elements in order of serviceID from small to large.

[0111] Optionally, step S130, based on the service proxy element master list and the sending function template, generating the service proxy sending module code may include:

[0112] Step S131: Generate a third list based on the sending page data in the service proxy element total list, wherein the third list includes a plurality of third elements, and each third element includes a plurality of third element data.

[0113] The sending page data is the data in the aforementioned "send" table. Exemplarily, in the sending module generation script, the static code of the sending module send.c and send.h files is written as a sending function template. The "send" table data is extracted to establish a third list, wherein each element of the third list includes the third element data {serviceID, methodID, portName, dataName, dataType}.

[0114] Step S132, using the third element data to replace the corresponding data variables in the sending function template to generate a sending function dynamic code, wherein the sending function template includes a sending function static code.

[0115] Traverse each third element in the third list, load the sending template function, replace the corresponding variables of the sending template function with the corresponding third element data, and generate the sending function dynamic code of all services in the send.c and send.h files in turn. The sending function dynamic code contains the assignment of the sending observation in the LOG module.

[0116] Step S140 may include generating the service agent receiving module code based on the service agent element master list and the receiving function template:

[0117] Step S141: Generate a fourth list based on the received page data in the service proxy element total list, wherein the fourth list includes a plurality of fourth elements, and each fourth element includes a plurality of fourth element data.

[0118] The receiving page data is the data in the aforementioned "receive" table. Exemplarily, in the receiving module generation script, the static code of the receiving module receive.c and receive.h files is written as the receiving function template. The "receive" table data is extracted to establish a fourth list, wherein each element of the fourth list includes fourth element data {serviceID, methodID, portName, dataName, dataType}.

[0119] Step S142, using the fourth element data to replace the corresponding data variable in the receiving function template to generate a receiving function dynamic code, wherein the receiving function template includes the receiving function static code.

[0120] Traverse each fourth element in the fourth list, load the receiving template function and the fixed function framework, replace the corresponding variables of the receiving template function with the corresponding fourth element data, and generate the receiving function dynamic code of all services in the receive.c and receive.h files in turn. The receiving function dynamic code contains the assignment of the received observation in the LOG module.

[0121] Therefore, the services that need to be proxied are classified into sending and receiving categories, encapsulated in templates, and combined with the extracted data information, automatic code generation is performed using Python, which greatly improves the efficiency and quality of software development.

[0122] Optionally, step S150 may include generating a service proxy log module maintenance code based on the service proxy element summary table:

[0123] Step S151: Generate a fifth list based on the service proxy element total list, wherein the fifth list includes a plurality of fifth elements, and each fifth element includes a plurality of fifth element data.

[0124] Exemplarily, in the LOG module generation script, the static code of the LOG module log.c and log.h files is written as the log code template. The data of the "send" table and the "receive" table are extracted to establish a fifth list, and each element of the fifth list includes the fifth element data {serviceID, methodID, dataName, dataType}.

[0125] Step S152: Use the fifth element data to replace the corresponding data variables in the log code template to generate a service agent log module maintenance code.

[0126] Traverse each fifth element in the fifth list, load the LOG code template, replace the corresponding variables in the LOG code template with the fifth element data, and generate the dynamic code of the observation definition and declaration of the log.c and log.h files in turn. In this way, errors during program operation can be recorded in real time, which is convenient for tracking and locating problems and reducing debugging and maintenance costs.

[0127] According to a second aspect of the present invention, a service proxy module automated development device is also proposed. Figure 3 FIG. 3 is a schematic block diagram of a service agent module automation development device 300 according to an embodiment of the present invention. Figure 3 As shown, the apparatus 300 may include: an architecture creation module 310 , a first generation module 320 , a second generation module 330 , and a third generation module 340 .

[0128] The architecture creation module 310 is used to create a software architecture of a service proxy module based on the service proxy requirements of the application to generate a corresponding extensible markup language format file;

[0129] The first generating module 320 is used to generate a service proxy element summary table based on the service interface mapping table, the communication service matrix and the extensible markup language format file;

[0130] A second generating module 330, for generating a service proxy sending module code based on the service proxy element master list and the sending function template;

[0131] The third generating module 340 is used to generate a service agent receiving module code based on the service agent element master list and the receiving function template.

[0132] According to a third aspect of the present invention, an electronic device is also provided. Figure 4 FIG. 4 shows a schematic block diagram of an electronic device 400 according to an embodiment of the present invention. Figure 4 As shown, the electronic device 400 may include a processor 410 and a memory 420. The memory 420 stores computer program instructions, which are used by the processor 410 to execute the service agent module automatic development method described above when the computer program instructions are executed.

[0133] According to a fourth aspect of the present invention, a storage medium is also provided, on which program instructions are stored, and the program instructions are used to execute the service agent module automation development method as described above when running. The storage medium may include, for example, a storage component of a tablet computer, a hard disk of a computer, a read-only memory (ROM), an erasable programmable read-only memory (EPROM), a portable compact disk read-only memory (CD-ROM), a USB memory, or any combination of the above storage media. The computer-readable storage medium may be any combination of one or more computer-readable storage media.

[0134] A person skilled in the art may understand the specific details and beneficial effects of the service agent module automation development device, electronic device and storage medium by reading the above description of the service agent module automation development method, which will not be described here for brevity.

[0135] In the several embodiments provided in the present application, it should be understood that the disclosed devices and / or equipment can be implemented in other ways. For example, the device embodiments described above are only schematic, for example, the division of units is only a logical function division, and there may be other division methods in actual implementation, such as multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, indirect coupling or communication connection of devices or units, which can be electrical, mechanical or other forms.

[0136] The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.

[0137] In addition, each functional unit in each embodiment of the present application may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit. The above-mentioned integrated unit may be implemented in the form of hardware or in the form of software functional units.

[0138] If the integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present application is essentially or the part that contributes to the prior art or all or part of the technical solution can be embodied in the form of a software product, and the computer software product is stored in a storage medium, including a number of instructions to enable a computer device (which can be a personal computer, a server, or a network device, etc.) to perform all or part of the steps of the various embodiments of the present application. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (Read-Only Memory, ROM), random access memory (Random Access Memory, RAM), disk or optical disk and other media that can store program codes.

[0139] The above embodiments are only used to illustrate the technical solutions of the present application, rather than to limit them. Although the present application has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or replace some of the technical features therein by equivalents. However, these modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the embodiments of the present application.

Claims

1. A method for automated development of a service proxy module, characterized in that: include: Based on the service proxy requirements of the application, create a software architecture of the service proxy module to generate the corresponding XML format file; Generate a service proxy element summary table based on the service interface mapping table, the communication service matrix and the extensible markup language format file; Generate a service proxy sending module code based on the service proxy element master list and the sending function template; Based on the service agent element master list and the receiving function template, a service agent receiving module code is generated.

2. The service agent module automated development method according to claim 1, characterized in that: The software architecture of the service proxy module is created based on the service proxy requirements of the application to generate a corresponding extensible markup language format file, including: Creating a request interface and an external service interface of the service proxy module, wherein the request interface is used to read the business information of the application, and the external service interface is used for the application to read the data information of the service proxy module; The extensible markup language format file is generated based on the business information and the data information.

3. The service agent module automated development method according to claim 2, characterized in that: The generating of the service proxy element master table based on the service interface mapping table, the communication service matrix and the extensible markup language format file comprises: Based on the extensible markup language format file, extract elements to establish a first list, wherein the first list includes a plurality of first elements, and each of the first elements includes a plurality of first element data; Extracting elements from all information in the service interface mapping table to establish a second list, wherein the second list includes a plurality of second elements, and each second element includes a plurality of second element data; The first list is respectively compared with the second list and the communication service matrix for element data query, so as to generate a corresponding service proxy element summary table based on the corresponding query and comparison results.

4. The service proxy module automated development method according to claim 3, characterized in that: The querying and comparing the first list with the second list and the communication service matrix respectively to generate a corresponding service proxy element summary table based on the corresponding query and comparison results includes: Inquiring whether there is second element data identical to the first element data of the first list in the second list, so as to obtain a first query result, wherein, if the first query result indicates that the first identical data exists, the value of the corresponding first element data is changed to the value of the second element data, and if the first query result indicates that the first identical data does not exist, a first error signal is generated; querying in the first list whether there is first element data identical to the second element data in the second list to obtain a second query result, wherein if the second query result indicates that there is second identical data, continue to query the next first element data until all the first element data are queried, and if the second query result indicates that there is no second identical data, generate a second error signal; Traversing the first elements in the first list to query whether there is the first element data identical to the third element data in the communication service matrix in the first list, and then obtaining a third query result, wherein, if the third query result indicates that there is third identical data, the value of the corresponding first element data is changed to the value of the third element data, and if the third query result indicates that there is no third identical data, a third error signal is generated; The first elements in the first list are grouped and sorted according to a preset rule to generate the service proxy element total list.

5. The service proxy module automated development method according to claim 3 or 4, characterized in that: The generating of the service agent sending module code based on the service agent element master list and the sending function template comprises: Generate a third list based on the sending page data in the service proxy element master list, wherein the third list includes a plurality of third elements, and each of the third elements includes a plurality of third element data; Replacing corresponding data variables in the sending function template with the third element data to generate a sending function dynamic code, wherein the sending function template includes a sending function static code; The generating of the service agent receiving module code based on the service agent element master list and the receiving function template comprises: Generate a fourth list based on the received page data in the service proxy element master list, wherein the fourth list includes a plurality of fourth elements, and each of the fourth elements includes a plurality of fourth element data; The fourth element data is used to replace the corresponding data variable in the receiving function template to generate a receiving function dynamic code, wherein the receiving function template includes a receiving function static code.

6. The service proxy module automated development method according to claim 3 or 4, characterized in that: The method further comprises: Based on the service proxy element summary table, a service proxy log module maintenance and testing code is generated.

7. The service proxy module automated development method according to claim 6, characterized in that: The generating of the service proxy log module maintenance code based on the service proxy element summary table includes: Based on the service proxy element summary table, generating a fifth list, wherein the fifth list includes a plurality of fifth elements, and each of the fifth elements includes a plurality of fifth element data; The fifth element data is used to replace the corresponding data variable in the log code template to generate the service agent log module maintenance code.

8. A service proxy module automated development device, characterized in that: include: An architecture creation module, used to create a software architecture of a service proxy module based on the service proxy requirements of the application, so as to generate a corresponding extensible markup language format file; A first generating module, configured to generate a service proxy element master list based on a service interface mapping table, a communication service matrix and the extensible markup language format file; A second generating module, used for generating a service agent sending module code based on the service agent element master list and the sending function template; The third generating module is used to generate a service agent receiving module code based on the service agent element master list and the receiving function template.

9. An electronic device, characterized in that: It comprises a processor and a memory, wherein the memory stores computer program instructions, and the computer program instructions are used by the processor to execute the service agent module automatic development method according to any one of claims 1 to 7 when the processor is running.

10. A storage medium having program instructions stored thereon, wherein the program instructions are used to execute the service agent module automatic development method according to any one of claims 1 to 7 when running.