Data processing method and device, electronic equipment and storage medium
Through the integrated development platform, the service definition file is converted into target data structures and generated applications, and the problem of SOA service definition data processing process in the existing technology is solved, efficient and unified data processing and code generation are achieved, and error risks are reduced. .
Patent Information
- Application Number
- CN202411036402.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-07-31
- Publication Date
- 2024-11-22
AI Technical Summary
The workflow of data processing methods that define SOA services in the prior art is scattered, and users need to switch between multiple independent tools, which increases learning difficulty and operational complexity, resulting in inefficiency and error risk.
Provides a data processing method and device, which uses the integrated development platform to convert service definition files into initial definition files of the target data structure, and generates applications based on the target definition files, supports visual editing and library code conversion, and integrates SOA service definitions, Editing and conversion processes to provide a unified development environment.
The workflow of SOA service definition has been simplified and optimized, reducing the user's need to switch between different tools, improving editing efficiency and accuracy, and the generated code is more flexible and reliable, adapting to the AUTOSAR platform.
Smart Images

Figure CN119005128A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of vehicle electronic technology, and more specifically, to a data processing method, device, electronic device and storage medium. Background Art
[0002] Service Oriented Architecture (SOA) is a service architecture that supports rapid response to business needs and can link different functions of an application by defining SOA services.
[0003] The existing data processing method for defining SOA services has a relatively scattered workflow and relies on multiple independent tools and platforms. For users, they need to switch between different tools, which not only increases the difficulty of user learning and adaptation, but also makes the operation more cumbersome and prone to operational errors, thereby reducing data processing efficiency. Summary of the invention
[0004] The purpose of this application is to provide a data processing method, device, electronic device and storage medium to solve the problems in the prior art in view of the deficiencies in the prior art.
[0005] To achieve the above purpose, the technical solution adopted in the embodiment of the present application is as follows:
[0006] In a first aspect, an embodiment of the present application provides a data processing method, which is applied to an integrated development platform, and the method includes:
[0007] In response to a user uploading a service definition file on an interface of the integrated development platform, converting the service definition file into an initial definition file of a target data structure, wherein the service definition file is used to define a service in a service-oriented architecture;
[0008] In response to a user's editing operation on the initial definition file on the interface of the integrated development platform, determining an edited target definition file;
[0009] Based on the target definition file, an application corresponding to the service is generated, and the application is used to define a service interface and a service data structure.
[0010] As a possible implementation manner, converting the service definition file into an initial definition file of a target data structure includes:
[0011] Parsing the service definition file to determine service definition data;
[0012] The service definition data is mapped into target service definition data of the target data structure, and the initial definition file is generated based on the target service definition data.
[0013] As a possible implementation manner, after parsing the service definition file to determine the service definition data, the method further includes:
[0014] Performing data specification detection on the service definition data to determine whether the service definition data meets a preset data specification;
[0015] If the service definition data does not meet the preset data specification, determining a data error attribute of the service definition data;
[0016] A correction strategy is determined according to the data error attribute, and the service definition data is adjusted based on the correction strategy.
[0017] As a possible implementation manner, mapping the service definition data to target service definition data of the target data structure includes:
[0018] In response to a user selecting a service definition template, determining the target data structure according to the service definition template selected by the user;
[0019] Responding to the user's adjustment operation on the initial mapping strategy based on service requirements, determining the target mapping strategy;
[0020] Based on the target mapping policy, the service definition data is mapped to target service definition data of the target data structure.
[0021] As a possible implementation manner, in response to the user's editing operation on the initial definition file on the interface of the integrated development platform, determining the edited target definition file includes:
[0022] Parsing the initial definition file to obtain the service hierarchy and service component information in the initial definition file;
[0023] Verifying the data of the initial definition file, and if the verification passes, displaying a structural view of the initial definition file according to the hierarchical structure of the service and the component information of the service, wherein the structural view is used to indicate the hierarchical relationship, dependency relationship and component information of the service;
[0024] In response to the user's editing operation on the structure view, an edited structure view is obtained;
[0025] The target definition file is determined according to the edited structure view.
[0026] As a possible implementation manner, generating an application corresponding to the service based on the target definition file includes:
[0027] Parsing the target definition file to determine attribute information of the service corresponding to the target definition file;
[0028] Based on the preset application template and the attribute information, an application corresponding to the service is generated.
[0029] As a possible implementation manner, the generating the application corresponding to the service based on the preset application template and the attribute information includes:
[0030] Extracting target definition information from the attribute information using a conversion engine, wherein the target definition information is definition information to be supplemented in the application template;
[0031] Perform synthesis processing based on the application template and the target definition information to generate an initial application corresponding to the service;
[0032] The initial application is optimized according to a preset coding strategy to generate an application corresponding to the service.
[0033] In a second aspect, an embodiment of the present application provides a data processing device, which is applied to an integrated development platform, and the device includes:
[0034] a conversion module, configured to respond to a user uploading a service definition file on an interface of the integrated development platform and convert the service definition file into an initial definition file of a target data structure, wherein the service definition file is used to define a service in a service-oriented architecture;
[0035] An editing module, used to respond to a user's editing operation on the initial definition file on the interface of the integrated development platform, and determine an edited target definition file;
[0036] A generation module is used to generate an application corresponding to the service based on the target definition file, and the application is used to define a service interface and a service data structure.
[0037] As a possible implementation manner, the conversion module is specifically used for:
[0038] Parsing the service definition file to determine service definition data;
[0039] The service definition data is mapped into target service definition data of the target data structure, and the initial definition file is generated based on the target service definition data.
[0040] As a possible implementation manner, the conversion module is further used for:
[0041] Performing data specification detection on the service definition data to determine whether the service definition data meets a preset data specification;
[0042] If the service definition data does not meet the preset data specification, determining a data error attribute of the service definition data;
[0043] A correction strategy is determined according to the data error attribute, and the service definition data is adjusted based on the correction strategy.
[0044] As a possible implementation manner, the conversion module is further used for:
[0045] In response to a user selecting a service definition template, determining the target data structure according to the service definition template selected by the user;
[0046] Responding to the user's adjustment operation on the initial mapping strategy based on service requirements, determining the target mapping strategy;
[0047] Based on the target mapping policy, the service definition data is mapped to target service definition data of the target data structure.
[0048] As a possible implementation, the editing module is specifically used for:
[0049] Parsing the initial definition file to obtain the service hierarchy and service component information in the initial definition file;
[0050] Verifying the data of the initial definition file, and if the verification passes, displaying a structural view of the initial definition file according to the hierarchical structure of the service and the component information of the service, wherein the structural view is used to indicate the hierarchical relationship, dependency relationship and component information of the service;
[0051] In response to the user's editing operation on the structure view, an edited structure view is obtained;
[0052] The target definition file is determined according to the edited structure view.
[0053] As a possible implementation, the generating module is specifically used for:
[0054] Parsing the target definition file to determine attribute information of the service corresponding to the target definition file;
[0055] Based on the preset application template and the attribute information, an application corresponding to the service is generated.
[0056] As a possible implementation manner, the generating module is further used for:
[0057] Extracting target definition information from the attribute information using a conversion engine, wherein the target definition information is definition information to be supplemented in the application template;
[0058] Perform synthesis processing based on the application template and the target definition information to generate an initial application corresponding to the service;
[0059] The initial application is optimized according to a preset coding strategy to generate an application corresponding to the service.
[0060] In a third aspect, an embodiment of the present application provides an electronic device, comprising: a processor, a storage medium and a bus, wherein the storage medium stores machine-readable instructions executable by the processor, and when the electronic device is running, the processor and the storage medium communicate through the bus, and the processor executes the machine-readable instructions to perform the steps of the data processing method as described in any one of the first aspects above.
[0061] In a fourth aspect, an embodiment of the present application provides a computer-readable storage medium, on which a computer program is stored. When the computer program is executed by a processor, the steps of the data processing method as described in any one of the first aspects above are executed.
[0062] According to the data processing method, device, electronic device and storage medium of the embodiment of the present application, in response to the user's operation of uploading the service definition file on the interface of the integrated development platform, the service definition file is converted into the initial definition file of the target data structure, in response to the user's editing operation on the initial definition file on the interface of the integrated development platform, the edited target definition file is determined, and based on the target definition file, the application corresponding to the service is generated. According to the embodiment of the present application, based on the integrated development platform, which is an adaptive platform tool based on Eclipse RCP, the service definition file that defines the SOA service can be processed and the service definition file can be converted into the initial definition file. In this process, not only the visual editing and saving functions of the initial definition file are supported to obtain the target definition file, but also the conversion of the target definition file into the corresponding library code is supported. Based on this, not only the workflow based on the SOA service definition is simplified and optimized, but also an integrated development environment is provided for users by combining with Eclipse RCP, so that the definition, editing and conversion of SOA services can be realized on an integrated platform, thereby saving time and reducing the possibility of errors, thereby improving data processing efficiency. BRIEF DESCRIPTION OF THE DRAWINGS
[0063] In order to more clearly illustrate the technical solutions of the embodiments of the present application, the drawings required for use in the embodiments will be briefly introduced below. It should be understood that the following drawings only show certain embodiments of the present application and therefore should not be regarded as limiting the scope. For ordinary technicians in this field, other related drawings can be obtained based on these drawings without paying creative work.
[0064] Figure 1 A schematic diagram of a data processing method provided in an embodiment of the present application is shown;
[0065] Figure 2 A schematic diagram of a data mapping method provided in an embodiment of the present application is shown;
[0066] Figure 3 A schematic diagram of a data detection method provided in an embodiment of the present application is shown;
[0067] Figure 4 A schematic diagram of a process for determining a target definition file provided in an embodiment of the present application is shown;
[0068] Figure 5 A schematic diagram showing a structural view provided by an embodiment of the present application is shown;
[0069] Figure 6 A schematic diagram of a process flow of an application generation method provided in an embodiment of the present application is shown;
[0070] Figure 7 A schematic diagram of the structure of a data processing device provided in an embodiment of the present application is shown;
[0071] Figure 8 A schematic structural diagram of an electronic device provided in an embodiment of the present application is shown. DETAILED DESCRIPTION
[0072] To make the purpose, technical scheme and advantages of the embodiments of the present application clearer, the technical scheme 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. It should be understood that the drawings in the present application only serve the purpose of explanation and description and are not used to limit the scope of protection of the present application. In addition, it should be understood that the schematic drawings are not drawn in real proportion. The flowchart used in this application shows the operations implemented according to some embodiments of the present application. It should be understood that the operations of the flowchart can be implemented out of sequence, and the steps without logical context can be reversed in order or implemented simultaneously. In addition, those skilled in the art can add one or more other operations to the flowchart under the guidance of the content of the present application, or remove one or more operations from the flowchart.
[0073] In addition, the described embodiments are only a part of the embodiments of the present application, rather than all the embodiments. The components of the embodiments of the present application described and shown in the drawings here can be arranged and designed in various configurations. Therefore, the following detailed description of the embodiments of the present application provided in the drawings is not intended to limit the scope of the application claimed for protection, but merely represents the selected embodiments of the present application. Based on the embodiments of the present application, all other embodiments obtained by those skilled in the art without making creative work belong to the scope of protection of the present application.
[0074] In order to enable those skilled in the art to use the content of this application, the following implementation is provided in conjunction with the specific application scenario "Adaptive platform tool based on EclipseRCP". For those skilled in the art, the general principles defined herein can be applied to other embodiments and application scenarios without departing from the spirit and scope of this application. Although this application is mainly described around the data processing method, it should be understood that this is only an exemplary embodiment.
[0075] It should be noted that the term "comprising" will be used in the embodiments of the present application to indicate the existence of the features declared thereafter, but does not exclude the addition of other features.
[0076] In the prior art, firstly, processing Excel files that define SOA services, editing ARXML files, and converting ARXML files into AUTOSAR AP library codes usually require the use of multiple independent tools and platforms. This decentralized workflow may lead to cumbersome operations and prone to errors, while also reducing work efficiency. Secondly, the prior art does not provide a unified integrated development environment, and users need to switch between different tools, which increases the difficulty of user learning and adaptation. Thirdly, there is a lack of intuitive visual tools when editing ARXML files, and users need to manually edit XML files, increasing the risk of errors. Fourthly, there is a lack of versatility when converting ARXML files into AUTOS AR AP library codes, and it is limited to specific AUTOSAR platforms.
[0077] In response to the above problems, an embodiment of the present application provides an integrated development platform, which is an adaptive platform tool based on Eclipse RCP, provides a unified user interface and operation logic, integrates the entire process of defining SOA services, editing ARXML files and converting to library code, and enables users to complete the entire work on the same platform, reducing the need for users to switch between different tools, thereby greatly simplifying the workflow. In addition, the integrated development platform introduces a visual tree structure editing function, allowing users to intuitively view and modify the structure of ARXML files, reducing the risk of errors in manual editing and improving editing efficiency and accuracy. In addition, the present application supports the conversion of ARXML files into general AUTOSAR AP library code, making the generated code more flexible and reliable, and adaptable to the AUTOSAR platform, thereby improving the applicability of the tool.
[0078] Figure 1 The flowchart of a data processing method provided in an embodiment of the present application is shown, and the method is applied to an integrated development platform. Figure 1 As shown, the method specifically comprises the following steps:
[0079] S101. In response to a user uploading a service definition file on an interface of an integrated development platform, the service definition file is converted into an initial definition file of a target data structure, wherein the service definition file is used to define a service in a service-oriented architecture.
[0080] Optionally, the integrated development platform is an adaptive platform based on Eclipse RCP, providing a graphical user interface for users to upload, manage, edit and test code or configuration files. Among them, Eclipse RCP is a framework for software client interface development, which is used to integrate the UI framework of various functional modules. The service definition file is a file that describes the structure, interface, operation and dependency of the service in the service-oriented architecture SOA, such as an Excel file that defines the SOA service. The format of the service definition file can be determined according to the adopted architecture standard or platform requirements.
[0081] For example, the SOA service definition is that the automotive architecture developer defines the functional service in an Excel file according to the requirements, and then uploads the service definition Excel file to the integrated development platform, and uses the function of converting Excel to ARXML file provided by the integrated development platform to convert the data format. Specifically, the service data in the Excel file is parsed using the Java language with the help of third-party libraries such as POI, and converted into an ARXML file.
[0082] For example, if a user defines a service called "RemoteDiagnostic" that allows the service center to remotely check the status of the vehicle, the user imports the service definition file corresponding to the service into the integrated development platform through the upload function of the integrated development platform, and uses the conversion tool to convert the service definition file into the initial definition file of the target data structure. In this process, it involves parsing each element in the service definition file and performing data conversion according to predefined rules or mapping strategies. Among them, the target data structure can be in ARXML format, and the converted ARXML file will be used as the initial definition of the service within the integrated development platform so that it can be integrated into the entire project development process.
[0083] S102: In response to the user's editing operation on the initial definition file on the interface of the integrated development platform, determine the edited target definition file.
[0084] Optionally, a tree structure editor is integrated into the integrated development platform. Based on the tree structure editor, users can intuitively view and modify the initial definition file and make customized adjustments to the service definition, further enhancing the flexibility and efficiency of application development.
[0085] Exemplarily, in response to the user's editing operation on the initial definition file, the integrated development platform generates a target definition file based on the edited content, wherein the editing operation includes but is not limited to adding or deleting service interfaces, modifying parameter types, adjusting service dependencies, optimizing configuration parameters, etc. The edited target definition file reflects all the user's editing operations and can be directly used for the next step of application compilation. Specifically, ARXML editing is based on the converted initial definition file, and is visually edited through the tree structure editor integrated in the integrated development platform, and the edited content is saved after the user completes the editing.
[0086] S103. Generate an application corresponding to the service based on the target definition file, where the application is used to define a service interface and a service data structure.
[0087] Optionally, based on the target definition file, the integrated development platform will automatically generate a specific application, that is, convert the service description into the code required for the service. The application not only implements the service interface defined in the target definition file, but also concretizes the data structure definition, allowing users to quickly transition from the conceptual design stage to the implementation and deployment stage, greatly improving development efficiency and application quality.
[0088] Exemplarily, the target definition file is an ARXML file, and an application corresponding to the service is generated based on the target definition file, that is, the ARXML file is converted into AUTOSAR AP library code. Specifically, by analyzing the ARXML file and applying the AUTOSAR AP standard, it is ensured that the generated application complies with the AUTOSAR specification, and the generated application can be directly applied to related projects.
[0089] Exemplarily, continuing with the above-mentioned service named "RemoteDiagnostic" as an example, the definition of the "RemoteDiagnostic" service is converted from Excel to ARXML format to generate a target definition file, which describes the interface and properties of the "RemoteDiagnostic" service. Further, for the "RemoteDiagnostic" service, a standard template containing vehicle diagnostic information is selected, and the mapping strategy is customized to include data fields for specific vehicles. If the user finds that the "RemoteDiagnostic" service lacks an important attribute, such as a vehicle identification code, the attribute is added through a visual tree structure editor and the modification is saved. Further, the ARXML file of the "RemoteDiagnostic" service is parsed and converted into C code, which defines the service interface and all necessary data structures and can run on an AUTOSAR-compatible vehicle control unit.
[0090] Based on this, according to the data processing method provided in the embodiment of the present application, based on the integrated development platform, which is an adaptive platform tool based on Eclipse RCP, the service definition file that defines the SOA service can be processed and the service definition file can be converted into an initial definition file. In this process, not only the initial definition file can be visually edited and saved to obtain the target definition file, but also the target definition file can be converted into the corresponding library code. Based on this, not only the workflow based on SOA service definition is simplified and optimized, but also an integrated development environment is provided for users by combining with Eclipse RCP, so that SOA service definition, editing and conversion can be realized on an integrated platform, thereby saving time and reducing the possibility of errors, thereby improving data processing efficiency.
[0091] As a possible implementation, the above step S101 converts the service definition file into an initial definition file of the target data structure, including:
[0092] The service definition file is parsed to determine the service definition data; the service definition data is mapped to target service definition data of a target data structure, and an initial definition file is generated based on the target service definition data.
[0093] Optionally, the service definition file is parsed to convert the various metadata contained in the service definition file into a data structure that can be directly operated by the program. That is, the parsed service definition data needs to be converted into a data structure that adapts to the integrated development platform to ensure that the service definition can be recognized and effectively utilized by the integrated development platform.
[0094] Optionally, Figure 2 A schematic diagram of a data mapping method provided in an embodiment of the present application is shown. Figure 2 As shown, the above steps map the service definition data to the target service definition data of the target data structure, specifically including the following steps:
[0095] S201 . In response to a user selecting a service definition template, a target data structure is determined according to the service definition template selected by the user.
[0096] Exemplarily, multiple service definition templates are predefined in the integrated development platform. Different service definition templates cover different types of microservices or design patterns. Each service definition template presets a set of basic frameworks and specifications for service design, defining the basic structure of the service. Based on the service definition template selected by the user, the integrated development platform will automatically or guide the user to clarify the target data structure, which is directly associated with the selected service definition template and indicates the expected form of the service definition under a specific implementation framework.
[0097] S202: In response to the user's adjustment operation on the initial mapping strategy based on service requirements, determine a target mapping strategy.
[0098] For example, the mapping strategy is an important guarantee to ensure that the data in the service definition file can be correctly mapped to the target service definition data. Based on the integrated development platform, users can customize the mapping strategy according to service requirements or project requirements. That is, when users find that the default initial mapping strategy cannot fully meet the needs of specific services during the initial mapping process, the integrated development platform allows users to intervene and adjust the mapping logic of the initial mapping strategy by users, such as modifying the field mapping relationship, adding custom validation rules, or adjusting the data format. After user adjustments, a set of customized target mapping strategies is determined. The target mapping strategy fully considers the specific needs and constraints of the service to ensure that the mapping process is not only technically feasible, but also reasonable in business.
[0099] S203: Based on the target mapping strategy, map the service definition data into target service definition data of the target data structure.
[0100] Exemplarily, based on the target mapping strategy determined by the user, the integrated development platform automatically performs data conversion, mapping the service definition data into target service definition data of the target data structure according to the target mapping strategy. The target service definition data is highly customized service definition data that can be directly used for development and deployment.
[0101] Exemplarily, the service data of the Excel file is parsed using Java language based on third-party libraries such as POI, and the parsed service data is encapsulated into a reasonable data structure to facilitate conversion of the service data into an ARXML file. For example, the parsed service data is mapped to the corresponding structure of the ARXML file according to the AUTOSAR standard.
[0102] Based on this, the entire data mapping process is highly interactive and flexible. Through the selection of service definition templates and the adjustment of mapping strategies, it can accurately adapt to user service definition requirements and automatically generate target service definition data.
[0103] Figure 3 A schematic diagram of a data detection method provided in an embodiment of the present application is shown. Figure 3 As shown, after parsing the service definition file and determining the service definition data, the method further includes:
[0104] S301: Perform data specification detection on service definition data to determine whether the service definition data meets preset data specifications.
[0105] Optionally, the preset data specification may define rules or requirements such as data structure, field type, value range, etc. The integrated development platform will automatically compare the service definition data with the preset data specification, obtain the compliance test results, and then identify the unreasonable aspects in the service definition data.
[0106] Exemplarily, data specification checking is performed on the service definition data, for example, rationality checking is performed on the service data defined in the Excel file to avoid problems such as errors or random filling by users.
[0107] S302: If the service definition data does not meet the preset data specification, determine the data error attribute of the service definition data.
[0108] Exemplarily, after the integrated development platform completes the normative test, it determines whether the service definition data fully complies with the preset data specification based on the normative test result. Specifically, if the service definition data meets the preset data specification, the subsequent editing operation and application generation processing are performed; if the service definition data does not meet the preset data specification, the error handling stage is entered to perform error detection and correction.
[0109] Exemplarily, if the integrated development platform detects that the service definition data does not meet the preset data specification, the integrated development platform further identifies data error attributes of the service definition data, such as missing fields, values exceeding the allowable range, whether the data format is correct, etc.
[0110] S303: Determine a correction strategy according to data error attributes, and adjust the service definition data based on the correction strategy.
[0111] For example, for the identified data error attributes, the integrated development platform and the user need to formulate corresponding correction strategies, including but not limited to automatic correction, manual correction by users, rejection of data or resubmission, etc. Further, the service definition data is adjusted or modified according to the determined correction strategy. This adjustment process is intended to ensure that the output service definition data not only complies with technical specifications, but also meets business logic and security requirements.
[0112] Based on this, the accuracy and reliability of service definition data are improved through strict verification and immediate error handling mechanisms. This process is not only an important part of service quality assurance in the entire application generation process, but also can reduce the risks caused by data problems in the subsequent application development and maintenance stages.
[0113] Figure 4 The following is a flow chart of a method for determining a target definition file provided by an embodiment of the present application. Figure 4 As shown, the above step S102 responds to the user's editing operation on the initial definition file on the interface of the integrated development platform to determine the edited target definition file, which specifically includes the following steps:
[0114] S401: Parse the initial definition file to obtain the service hierarchy and component information of the service in the initial definition file.
[0115] Exemplarily, the integrated development platform parses the initial definition file and identifies how services are organized, including the hierarchical structure between services and component information contained in each service, where the hierarchical structure includes, for example, which services are basic services and which are advanced services that depend on basic services, and the component information includes, for example, specific classes, functions or libraries implemented by the services.
[0116] S402. Verify the data of the initial definition file. If the verification passes, display the structural view of the initial definition file according to the service hierarchy and service component information. The structural view is used to indicate the hierarchical relationship, dependency relationship and component information of the service.
[0117] For example, the integrated development platform verifies the data in the initial definition file to ensure that the service data conforms to the expected format, logic and rules. The verification operation includes but is not limited to checking data integrity, format correctness, rationality of dependencies, etc., to avoid subsequent steps based on incorrect input.
[0118] For example, if the verification is passed, the interface provided by the integrated development platform will display the service hierarchy, dependency relationship and component information in a tree structure, that is, Figure 5 The structural view shown in the figure makes it easier for users to intuitively understand the service architecture and facilitate subsequent modification and analysis. Figure 5 As shown, services are provided by components. Each service can be directly associated with one or more components. When components are displayed in a tree structure, the attribute information of the components is also displayed at the same time.
[0119] S403: Respond to the user's editing operation on the structure view and obtain an edited structure view.
[0120] For example, based on the tree structure editor integrated in the integrated development platform, users can directly edit on the structure view, such as adding and deleting services, adjusting the service hierarchy, modifying component configuration, etc. This interactive process makes the design process of the target definition file more flexible and intuitive. Furthermore, after the user completes the editing, the integrated development platform will update the structure view according to the user's editing operation to obtain the edited structure view, which reflects the latest service architecture design.
[0121] S404: Determine the target definition file according to the edited structure view.
[0122] Exemplarily, based on the edited structural view, the integrated development platform generates a target definition file according to the service definition information provided by the edited structural view, and the target definition file includes the service definition information modified by the user.
[0123] Based on this, the tree structure editor integrated in the integrated development platform is used to intuitively display the structural view of the service definition for users, and users can modify and edit the structural view. This process not only ensures the accuracy of service design, but also improves the efficiency and quality of service design through visualization and interactivity.
[0124] As a possible implementation, the above step S103 generates an application corresponding to the service based on the target definition file, including:
[0125] The target definition file is parsed to determine the attribute information of the service corresponding to the target definition file; based on the preset application template and attribute information, an application corresponding to the service is generated.
[0126] Optionally, the integrated development platform conducts in-depth analysis on the target definition file confirmed after editing by the user, extracts the information at the design level and converts it into a data structure operable by the electronic device. Through the parsing process, the integrated development platform clarifies the specific attribute information of each service, which is the details necessary to build a service instance.
[0127] For example, in the development environment of the integrated development platform, multiple application templates are preset, which are general and reusable configuration sets, based on which specific types of services can be quickly started and configured. The application templates include basic code structures, dependency management configurations, compilation scripts, deployment configuration files, etc.
[0128] Figure 6 The flowchart of a method for generating an application program provided in an embodiment of the present application is shown. Figure 6 As shown, the above steps generate an application corresponding to the service based on the preset application template and attribute information, and specifically include the following steps:
[0129] S601. Utilize a conversion engine to extract target definition information from attribute information, where the target definition information is definition information to be supplemented in an application template.
[0130] For example, the conversion engine, an automated tool, is used to extract target definition information from attribute information that directly guides how to build an application. The target definition information is equivalent to the blank part of the application, which clarifies where in the general application template needs to be filled with specific service configuration or function definition. In other words, the application template is the basic architecture of the service, while the target definition information is the customized details specific to a certain service.
[0131] S602: Perform synthesis processing based on the application template and the target definition information to generate an initial application corresponding to the service.
[0132] For example, the synthesis process is that the integrated development platform fills the target definition information extracted from the attribute information into the application template, thereby creating an application framework that preliminarily meets the service requirements, that is, generating an initial application. In this process, it may involve the insertion of code snippets, the modification of configuration files, the adjustment of dependencies, etc.
[0133] S603: Optimize the initial application program according to a preset coding strategy to generate an application program corresponding to the service.
[0134] For example, the preset coding strategy is the AUTOSAR AP standard, and the generated initial application needs to be further optimized to improve performance, ensuring that the generated application can not only run, but also run efficiently and safely. Specifically, the library code that can run on the AUTOSAR platform is generated according to the AUTOSAR AP standard.
[0135] Based on this, the integrated development platform supports the conversion of ARXML files into general AUTOSAR AP library code, making the generated code more flexible and reliable, adaptable to the AUTOSAR platform, thereby improving the applicability of the integrated development platform.
[0136] Based on the same inventive concept, a data processing device corresponding to the data processing method is also provided in the embodiment of the present application. Since the principle of solving the problem by the data processing device in the embodiment of the present application is similar to the above-mentioned data processing method in the embodiment of the present application, the implementation of the data processing device can refer to the implementation of the data processing method, and the repeated parts will not be repeated.
[0137] Reference Figure 7 FIG. 7 is a schematic diagram of a data processing device provided in an embodiment of the present application. The data processing device 700 includes: a conversion module 701, an editing module 702, and a generation module 703, wherein:
[0138] The conversion module 701 is used to respond to the user uploading a service definition file on the interface of the integrated development platform, and convert the service definition file into an initial definition file of a target data structure, wherein the service definition file is used to define the service in the service orientation architecture;
[0139] The editing module 702 is used to respond to the user's editing operation on the initial definition file on the interface of the integrated development platform and determine the edited target definition file;
[0140] The generation module 703 is used to generate an application corresponding to the service based on the target definition file, and the application is used to define the service interface and service data structure.
[0141] Based on this, according to the data processing device of the embodiment of the present application, based on the integrated development platform, which is an adaptive platform tool based on Eclipse RCP, the service definition file that defines the SOA service can be processed and the service definition file can be converted into an initial definition file. In this process, it not only supports visual editing and saving of the initial definition file to obtain the target definition file, but also supports converting the target definition file into the corresponding library code. Based on this, it not only simplifies and optimizes the workflow based on SOA service definition, but also provides users with an integrated development environment by combining with Eclipse RCP, so as to realize the definition, editing and conversion of SOA services on an integrated platform, thereby saving time and reducing the possibility of errors, thereby improving data processing efficiency.
[0142] In a possible implementation manner, the conversion module 701 is specifically used for:
[0143] Parse the service definition file to determine the service definition data;
[0144] The service definition data is mapped to target service definition data of a target data structure, and an initial definition file is generated based on the target service definition data.
[0145] In a possible implementation manner, the conversion module 701 is further configured to:
[0146] Performing data specification detection on the service definition data to determine whether the service definition data meets the preset data specification;
[0147] If the service definition data does not meet the preset data specification, determining a data error attribute of the service definition data;
[0148] According to the data error attributes, a correction strategy is determined, and the service definition data is adjusted based on the correction strategy.
[0149] In a possible implementation manner, the conversion module 701 is further configured to:
[0150] In response to a user selecting a service definition template, determining a target data structure according to the service definition template selected by the user;
[0151] Responding to the user's adjustment operation on the initial mapping strategy based on service requirements, determining the target mapping strategy;
[0152] Based on the target mapping strategy, the service definition data is mapped to target service definition data of the target data structure.
[0153] In a possible implementation manner, the editing module 702 is specifically used for:
[0154] Parse the initial definition file to obtain the service hierarchy and component information of the service in the initial definition file;
[0155] Verify the data of the initial definition file. If the verification passes, display the structure view of the initial definition file according to the service hierarchy and service component information. The structure view is used to indicate the service hierarchy, dependency relationship and service component information.
[0156] Responding to the user's editing operation on the structure view, obtaining the edited structure view;
[0157] Based on the edited structure view, determine the target definition file.
[0158] In a possible implementation manner, the generation module 703 is specifically used to:
[0159] Parse the target definition file to determine the attribute information of the service corresponding to the target definition file;
[0160] Generate an application corresponding to the service based on the preset application template and attribute information.
[0161] In a possible implementation manner, the generating module 703 is further configured to:
[0162] The target definition information is extracted from the attribute information by using a conversion engine, and the target definition information is the definition information to be supplemented in the application template;
[0163] Perform synthesis processing based on the application template and target definition information to generate an initial application corresponding to the service;
[0164] The initial application is optimized according to the preset coding strategy to generate an application corresponding to the service.
[0165] For descriptions of the processing flow of each module in the device and the interaction flow between each module, reference may be made to the relevant descriptions in the above method embodiment, which will not be described in detail here.
[0166] The present application embodiment also provides an electronic device 800, such as Figure 8 As shown, it is a schematic diagram of the structure of an electronic device 800 provided in an embodiment of the present application, including: a processor 801, a memory 802, and optionally, a bus 803. The memory 802 stores machine-readable instructions executable by the processor 801. When the electronic device 800 is running, the processor 801 communicates with the memory 802 through the bus 803. When the machine-readable instructions are executed by the processor 801, the steps of the data processing method described in any one of the above items are performed.
[0167] An embodiment of the present application further provides a computer-readable storage medium, on which a computer program is stored. When the computer program is executed by a processor, the steps of any of the above data processing methods are executed.
[0168] Those skilled in the art can clearly understand that, for the convenience and simplicity of description, the specific working process of the system and device described above can refer to the corresponding process in the method embodiment, and will not be repeated in this application. In the several embodiments provided in this application, it should be understood that the disclosed system, device and method can be implemented in other ways. The device embodiments described above are merely schematic. For example, the division of the modules is only a logical function division. There may be other division methods in actual implementation. For example, multiple modules 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 communication interfaces, indirect coupling or communication connection of devices or modules, which can be electrical, mechanical or other forms.
[0169] In addition, each functional unit in each embodiment of the present application can be integrated into a processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit. If the function 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 invention is essentially or part of the technical solution that contributes to the prior art or part of the technical solution can be embodied in the form of a software product, which is stored in a storage medium, including several instructions for 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 method described in each embodiment of the present invention. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (ROM, Read-Only Memory), random access memory (RAM, RandomAccess Mem ory), disk or optical disk and other media that can store program code.
[0170] The above are only specific implementation methods of the present application, but the protection scope of the present application is not limited thereto. Any technician familiar with the technical field can easily think of changes or substitutions within the technical scope disclosed in the present application, which should be covered by the protection scope of the present application.
Claims
1. A data processing method, characterized in that: Applied to an integrated development platform, the method comprises: In response to a user uploading a service definition file on an interface of the integrated development platform, converting the service definition file into an initial definition file of a target data structure, wherein the service definition file is used to define a service in a service-oriented architecture; In response to a user's editing operation on the initial definition file on the interface of the integrated development platform, determining an edited target definition file; Based on the target definition file, an application corresponding to the service is generated, and the application is used to define a service interface and a service data structure.
2. The data processing method according to claim 1, characterized in that: The step of converting the service definition file into an initial definition file of a target data structure comprises: Parsing the service definition file to determine service definition data; The service definition data is mapped into target service definition data of the target data structure, and the initial definition file is generated based on the target service definition data.
3. The data processing method according to claim 2, characterized in that: After parsing the service definition file to determine the service definition data, the method further includes: Performing data specification detection on the service definition data to determine whether the service definition data meets a preset data specification; If the service definition data does not meet the preset data specification, determining a data error attribute of the service definition data; A correction strategy is determined according to the data error attribute, and the service definition data is adjusted based on the correction strategy.
4. The data processing method according to claim 2, characterized in that: The mapping of the service definition data to target service definition data of the target data structure comprises: In response to a user selecting a service definition template, determining the target data structure according to the service definition template selected by the user; Responding to the user's adjustment operation on the initial mapping strategy based on service requirements, determining the target mapping strategy; Based on the target mapping policy, the service definition data is mapped to target service definition data of the target data structure.
5. The data processing method according to claim 1, characterized in that: The step of responding to the user's editing operation on the initial definition file on the interface of the integrated development platform to determine the edited target definition file includes: Parsing the initial definition file to obtain the service hierarchy and service component information in the initial definition file; Verifying the data of the initial definition file, and if the verification passes, displaying a structural view of the initial definition file according to the hierarchical structure of the service and the component information of the service, wherein the structural view is used to indicate the hierarchical relationship, dependency relationship and component information of the service; In response to the user's editing operation on the structure view, an edited structure view is obtained; The target definition file is determined according to the edited structure view.
6. The data processing method according to claim 1, characterized in that: The step of generating an application corresponding to the service based on the target definition file includes: Parsing the target definition file to determine attribute information of the service corresponding to the target definition file; Based on the preset application template and the attribute information, an application corresponding to the service is generated.
7. The data processing method according to claim 6, characterized in that: The generating the application corresponding to the service based on the preset application template and the attribute information includes: Extracting target definition information from the attribute information using a conversion engine, wherein the target definition information is definition information to be supplemented in the application template; Perform synthesis processing based on the application template and the target definition information to generate an initial application corresponding to the service; The initial application is optimized according to a preset coding strategy to generate an application corresponding to the service.
8. A data processing device, characterized in that: Applied to an integrated development platform, the device comprises: a conversion module, configured to respond to a user uploading a service definition file on an interface of the integrated development platform and convert the service definition file into an initial definition file of a target data structure, wherein the service definition file is used to define a service in a service-oriented architecture; An editing module, used to respond to a user's editing operation on the initial definition file on the interface of the integrated development platform, and determine an edited target definition file; A generation module is used to generate an application corresponding to the service based on the target definition file, and the application is used to define a service interface and a service data structure.
9. An electronic device, characterized in that: include: A processor and a memory, wherein the memory stores machine-readable instructions executable by the processor, and when the electronic device is running, the processor executes the machine-readable instructions to perform the steps of the data processing method according to any one of claims 1 to 7.
10. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the steps of the data processing method according to any one of claims 1 to 7 are executed.
