CN116010170A - Judgment method, system, equipment and medium for data type snapshot generation - Google Patents

Judgment method, system, equipment and medium for data type snapshot generation Download PDF

Info

Publication number
CN116010170A
CN116010170A CN202310056820.1A CN202310056820A CN116010170A CN 116010170 A CN116010170 A CN 116010170A CN 202310056820 A CN202310056820 A CN 202310056820A CN 116010170 A CN116010170 A CN 116010170A
Authority
CN
China
Prior art keywords
data type
type information
information
data
snapshot
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202310056820.1A
Other languages
Chinese (zh)
Inventor
吴天宇
周小波
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Chongqing Changan Automobile Co Ltd
Original Assignee
Chongqing Changan Automobile Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Chongqing Changan Automobile Co Ltd filed Critical Chongqing Changan Automobile Co Ltd
Priority to CN202310056820.1A priority Critical patent/CN116010170A/en
Publication of CN116010170A publication Critical patent/CN116010170A/en
Pending legal-status Critical Current

Links

Images

Abstract

The invention particularly relates to a judging method for data type snapshot generation; the method comprises the steps of newly building a service in a tool chain module based on Service Oriented Architecture (SOA) service design; determining version information of the newly-built service, acquiring data type information included in the version information, circulating each piece of data type information, and calculating an MD5 value for generating the data type information; inquiring whether the MD5 value exists in a data snapshot table of the data type information, and judging to carry out snapshot backup on the data type information under the version information; the invention calculates the MD5 value according to the attribute information owned by the data type, and if the data snapshot corresponding to the MD5 value exists, the data snapshot is not repeatedly stored. The method avoids the problem that redundant data is generated due to snapshot backup of the data type when new service is released, improves the usability of the system, saves the storage space and reduces the maintenance cost.

Description

Judgment method, system, equipment and medium for data type snapshot generation
Technical Field
The invention relates to the technical field of automobile SOA (service oriented architecture) service, in particular to a judging method, a judging system, judging equipment and judging media for data type snapshot generation.
Background
Along with the trend of intellectualization, networking and sharing of automobiles, the expectations of end users on functions of the automobiles are changed silently, and the automobiles realize high-grade automatic driving/auxiliary driving functions and simultaneously tend to improve user experience, for example, rapid function updating and upgrading are met, so that personalized, humanized and differentiated functions, services and the like can be provided. Service-oriented software architecture (Service-Oriented Architecture) is providing a good solution for future vehicle software services. Different from a signal-oriented architecture in a traditional automobile electronic and electric architecture, a service-oriented software architecture (SOA) is combined with a high-performance computing platform-domain controller-core centralized electronic and electric architecture in the future through a standardized service interface, a loosely-coupled service mechanism and combinable and expandable service characteristics, and becomes a technical foundation of software-driven innovation in the automobile field.
The SOA service design tool chain module provides definition of the service, definition of the method of the service and parameter definition of the method for the user. The services defined by the user in the tool chain module will be provided as an interface to the user for invocation. The user may make constant modifications to the content of the service during the definition process, and there may be differences in the content of the service at different time nodes. Thus, the system provides the user with the functionality of a service version, which the user can create under the same service multiple versions for definition. In order to ensure that the information (method, method parameters, parameter data types and the like provided by the service) of the provider and the user of the interface are consistent, the system provides a function of releasing a service version, after the service version is released, the content cannot be modified, and when a version of an SOA service is released, in order to keep the version information of the service for a user to view and trace in the future, the system performs snapshot backup on the information of the service version, including the information of the service, the method information in the service and the data type information of the parameters in the method. Thus, if the user continuously iterates version upgrade on one service, the user can simultaneously check and compare all the latest and past version information in the system. Currently, there may be multiple versions of a service, multiple methods in each version, and multiple parameter parameters for each method, so that there are many data types for a version. Meanwhile, multiple services in the same domain may refer to the same data type. If each version is released without a change in the data type, a backup table storing the data type snapshot stores a large amount of redundant data, thereby increasing system overhead and maintenance cost.
Disclosure of Invention
In view of the above-mentioned drawbacks of the prior art, the present invention provides a method, a system, a device, and a medium for determining generation of a data type snapshot, where the determination is made by querying whether an MD5 value of a currently used data type exists in a data type snapshot table, and if the data snapshot corresponding to the MD5 value already exists, the repeated storage is not performed, so that the problem of redundant data generation caused by data type snapshot backup during new service release is avoided.
The invention provides a judging method for data type snapshot generation, which comprises the following steps:
s10, newly building a service in a tool chain module based on Service Oriented Architecture (SOA) service design;
s20, determining version information of the newly-built service, acquiring data type information included in the version information, circulating each piece of data type information, and calculating a message digest algorithm fifth version MD5 value for generating the data type information;
s30, inquiring whether the MD5 value exists in a data snapshot table of the data type information, if so, not carrying out snapshot generation on the data type information under the version information, and if not, carrying out snapshot backup on the data type information under the version information.
In an embodiment of the invention, the step S10 includes:
determining version information of the newly created service in the tool chain module;
a user defines method information parameters in the version information in the tool chain module;
and the user defines the data type information of the method information parameters in the tool chain module.
In an embodiment of the invention, the step S20 includes:
splicing attribute information owned by the data type information;
separating the attribute information by commas to obtain a calculated value computeValue character string;
and transmitting the computeValue character string as a parameter into an MD5 hash Hex function to generate the MD5 value.
In an embodiment of the present invention, the data type information includes basic data, structure data, an array, and enumeration; in the step S20 of the above-mentioned process,
when the data type information is basic data or an array, the computeValue character string is used as a parameter to be transmitted into an MD5Hex function to generate the MD5 value;
when the data type information is structural data or enumeration, traversing attribute member information owned by the data type information, splicing and putting each attribute member information into a character string set, traversing the character string set, splicing the character string set into the computeValue character string, and converting the computeValue character string into the MD5 value through an MD5Hex function.
In an embodiment of the present invention, the attribute information owned by the data type information includes name information of the data type information, identification information of the data type information, a sub-class data ID of the data type information, length information of the data type information, and array type information of the data type information;
the attribute member information includes name information of the member, ID of the data type information of the member, order information of the member, identifier value information of the member, and MD5 value information of the member.
In an embodiment of the present invention, in the step S20, it is determined whether the data type information belongs to basic data or an array according to the attribute information of the data type information, and the attribute information of the data type information is spliced to form the computeValue string to generate the MD5 value.
In an embodiment of the present invention, in the step S20, a method for obtaining the MD5 value information of the member includes:
judging whether the data type information is structural body data or enumeration;
if the data type information is not structural data or enumeration, generating the MD5 value of the data type information according to the computeValue character string;
and if the data type information is structural data or enumeration, traversing the attribute member information of the data type information, splicing the attribute member information to form the character string set, splicing the character string set to the computeValue character string, and generating the MD5 value of the data type information of the attribute member.
In an embodiment of the invention, the step S30 includes:
the tool chain module queries whether the MD5 value exists in snapshot data in a database;
if the same snapshot data exists, the tool chain module points to the queried snapshot data when using the snapshot backup of the data type information,
and if the same snapshot data do not exist, the tool chain module performs snapshot backup on the data type information.
In an embodiment of the present invention, in the step S10, the tool chain module can customize the name of the data type information when the service is newly built, and the method includes:
if the data type information is basic data, selecting the basic data represented by the corresponding data type information;
if the data type information is structural data, customizing the name of the attribute member and the data type information of the attribute member;
if the data type information is an array, designating the data type information of the array member;
and if the data type information is enumeration, designating the name and the corresponding value of the attribute member in the enumeration.
The invention also provides a judging system for generating the data type snapshot, which comprises the following steps:
the system comprises a tool chain module, a user and a service management module, wherein the user establishes a service through the tool chain module, and the content of the established service comprises version information, method information and data type information;
an MD5 value generating module, which calculates and generates an MD5 value of the data type information;
and the data snapshot module inquires snapshot data of the MD5 value of the data type information in the tool chain module database and judges whether to generate a data snapshot of the data type information according to an inquiry result.
In an embodiment of the present invention, if the data snapshot module queries the same snapshot data in the database of the tool chain module, the snapshot backup is not performed on the data type information, and the queried snapshot data is pointed when the data type information is used; and if the same snapshot data is not queried, carrying out snapshot backup on the data type information.
In an embodiment of the present invention, the data type information includes basic data, structure data, an array, and enumeration;
when the data type information is basic data or an array, the MD5 value generation module splices attribute information of the data type information to form a computeValue character string, and transmits the computeValue character string as a parameter to the MD5 value generation module to calculate and generate the MD5 value;
when the data type information is structural data or enumeration, the MD5 value generation module traverses attribute member information owned by the data type information, splices and places each attribute member information into a character string set, traverses the character string set, splices the character string set into the computeValue character string, and converts the computeValue character string into the MD5 value through the MD5 value generation module.
The invention further provides an electronic device comprising a memory and a processor, wherein at least one program is stored in the memory, and the at least one program is loaded and executed by the processor to realize the method.
The present invention also provides a computer readable storage medium having stored therein at least one instruction that is loaded and executed by a processor to implement the above-described method.
The invention has the beneficial effects that: the invention mainly relates to a judging method for generating data snapshot, which is a method for calculating MD5 value according to attribute information owned by a data type, judging whether the data type performs snapshot backup when judging release of a version, judging whether the MD5 value of the currently used data type exists in a data type snapshot table or not by inquiring, and if the data snapshot corresponding to the MD5 value exists, not repeatedly storing. The method avoids the problem that redundant data is generated due to snapshot backup of the data type when new service is released, improves the usability of the system, saves the storage space and reduces the maintenance cost.
It is to be understood that both the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the invention as claimed.
Drawings
The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the invention and together with the description, serve to explain the principles of the invention. It is evident that the drawings in the following description are only some embodiments of the present invention and that other drawings may be obtained from these drawings without inventive effort for a person of ordinary skill in the art. In the drawings:
FIG. 1 is a flow chart of a method for determining the generation of a snapshot of data type information in the present invention;
FIG. 2 is a logic flow diagram of determining whether data type information is backed up in the present invention;
FIG. 3 is a classification diagram of data type information in the present invention;
FIG. 4 is a logic flow diagram of the MD5 value calculation of the data type information concatenation computeValue string according to the present invention;
FIG. 5 is a logic flow diagram of MD5 value generation when determining whether data type information is structure data or enumeration in accordance with the present invention;
fig. 6 is a block diagram of a data type information snapshot generation judgment system in the present invention.
In the figure: 100. a tool chain module; 11. newly-built service; 12. version information; 13. data type information; 131. basic data; 132. structural body data; 133. an array; 134. enumerating; 14. MD5 value; 15. snapshot data; 16. a computeValue string; 17. a character string set; 200. an MD5 value generation module; 300. and a data snapshot module.
Detailed Description
Other advantages and effects of the present invention will become apparent to those skilled in the art from the following disclosure, which describes the embodiments of the present invention with reference to specific examples. The invention may be practiced or carried out in other embodiments that depart from the specific details, and the details of the present description may be modified or varied from the spirit and scope of the present invention. It should be noted that the following embodiments and features in the embodiments may be combined with each other without conflict. It is also to be understood that the terminology used in the examples of the invention is for the purpose of describing particular embodiments only, and is not intended to limit the scope of the invention. The test methods in the following examples, in which specific conditions are not noted, are generally conducted under conventional conditions or under conditions recommended by the respective manufacturers.
Please refer to fig. 1 to 6. It should be understood that the structures, proportions, sizes, etc. shown in the drawings are for illustration purposes only and should not be construed as limiting the invention to the extent that it can be practiced, since modifications, changes in the proportions, or otherwise, used in the practice of the invention, are not intended to be critical to the essential characteristics of the invention, but are intended to fall within the spirit and scope of the invention. Also, the terms such as "upper," "lower," "left," "right," "middle," and "a" and the like recited in the present specification are merely for descriptive purposes and are not intended to limit the scope of the invention, but are intended to provide relative positional changes or modifications without materially altering the technical context in which the invention may be practiced.
The present invention is based on an SOA service design tool chain module 100. When a user builds a service 11 in the tool chain module 100, before defining a method, the user needs to determine version information 12 of the new service 11, and then can define the method and parameter information under the version information 12. The version information 12 includes content information of the newly created service 11, method information of the service content, and data type information 13 of parameters in the method; one SOA service includes a plurality of version information 12, each version information 12 including a plurality of method information, each method information including data type information 13 of a plurality of parameters.
The user can create different version information 12 under the same new service 11 according to the content provided by the new service 11. When the content of the version information 12 of the newly created service 11 needs to be fixed, the user can issue the version information 12 thereof. In order to ensure traceability of the version information 12 of the newly built service 11 and provide a viewing function of the historical version information 12 for a user, when the version information 12 is released, the tool chain module 100 performs a data snapshot backup on the version information 12 in the background, wherein all data type information 13 used by the version information 12 is backed up. If each version information 12 is not differentiated for direct backup at the time of release, a large amount of redundant data may be generated, which not only reduces the usability of the tool chain module 100, but also increases the maintenance cost. Therefore, we invented a method for judging the change of the snapshot of the data type information 13, and in order to judge whether the current data type information 13 is changed compared with the stored snapshot of the data type information 13 without repeatedly storing the same data type aiming at the snapshot of the data type information 13, the MD5 value 14 is introduced for judging.
Referring to fig. 1 and fig. 2, the present invention provides a method for determining generation of a data type snapshot, including:
s10, newly building a service 11 in the SOA service design tool chain module 100 based on the service-oriented architecture;
s20, determining version information 12 of the newly-built service 11, acquiring data type information 13 included in the version information 12, then circulating each data type information 13, and calculating a message digest algorithm fifth version MD5 value 14 for generating the data type information 13;
s30, inquiring whether the MD5 value 14 exists in a data snapshot table of the data type information 13, if the same snapshot data 15 exists, not generating a snapshot of the data type information 13 under the version information 12, and if the same snapshot data 15 does not exist, carrying out snapshot backup on the data type information 13 under the version information 12.
The step S10 includes determining version information 12 of the new service 11 in the tool chain module 100, method information parameters in the version information 12 in the user-defined tool chain module 100, and data type information 13 of the method information parameters in the user-defined tool chain module 100.
In the SOA service design tool chain module 100 of the present embodiment, when a service 11 is newly created, different types may be selected in the method corresponding to the version information 12 of the newly created service 11, and correspondingly, the data types used by the parameters under the method are also different. For example, in addition to the data type information 13 that is self-contained in the C language in the tool chain module 100, the user may also customize the data type information 13 in the tool chain module 100. The user may name and define the data type information 13 according to his habit, and combine the data type information 13 defined in the tool chain module 100 to form the user-defined content of the new service 11. If the user wants to solidify a certain version information 12 of the new service 11, the tool chain module 100 provides a function of publishing the version information 12 of the new service 11, and the user can simultaneously view the released and unpublished version information 12 of the new service 11 in the tool chain module 100. After the user issues the version information 12 of the new service 11, the tool chain module 100 performs a data snapshot backup on the content of the version information 12 of the new service 11, which includes a backup on the data type information 13. Since the difference between the version information 12 of the newly built service 11 may be only the increase or decrease of the method instead of the change of the data type information 13, the present embodiment provides a method for determining the generation of the data type snapshot, so as to determine whether the data type information 13 needs to be backed up for storage when the version information 12 of the newly built service 11 is released, thereby reducing the repeated storage of the same content.
The data type information 13 mainly includes a name of a data type, a number identifier, a sub-class data ID, a data type length, an array 133 type, and if there are members, and the above-mentioned attributes of the data type corresponding to the members, the corresponding MD5 value 14 may be generated by organizing the data type information. Judging whether the data type snapshot of the current release version is stored in the database or not through the MD5 value 14, specifically, acquiring the MD5 value 14 of the data type used under the current version, inquiring whether the MD5 exists in the data snapshot table or not, if snapshot data 15 exists, not reinserting the data under the version, and pointing to the inquired snapshot data 15 when snapshot backup is carried out by using the data type method. If snapshot data 15 is not present, a snapshot backup is made of the data under that version.
Referring to fig. 3, 4 and 5, in one embodiment, step S20 includes:
splicing attribute information owned by the data type information 13;
obtaining a calculated value computeValue character string 16 through comma separation attribute information;
the computeValue string 16 is passed as a parameter into the MD5 hash Hex function to generate the MD5 value 14.
Wherein data type information 13 includes base data 131, structure data 132, array 133, and enumeration 134; in the step S20 of the process,
when the data type information 13 is basic data 131 or an array 133, the computeValue string 16 is used as a parameter to be transmitted into an MD5Hex function to generate an MD5 value 14;
when the data type information 13 is the structure data 132 or the enumeration 134, traversing the attribute member information owned by the data type information 13, splicing each attribute member information into the character string set 17, traversing the character string set 17, splicing the character string set 17 to the computeValue character string 16, and converting the computeValue character string 16 into the MD5 value 14 through the MD5Hex function.
The attribute information possessed by the data type information 13 includes name information of the data type information 13, identification information of the data type information 13, sub-class data ID of the data type information 13, length information of the data type information 13, and array 133 type information of the data type information 13;
the attribute member information includes name information of the member, ID of the member data type information 13, order information of the member, identifier value information of the member, and MD5 value 14 information of the member.
The data type information 13 is divided into basic data 131, structure data, array 133 and enumeration 134. Wherein the base data 131 may be aliased, i.e., base alias data. As shown in fig. 4, the calculation logic of the MD5 value 14 of one data type information 13 is different according to the classification. Firstly, the name of the data type information 13, the identification of the data type information 13, the sub-class data ID of the data type information 13, the length of the data type information 13 and the array 133 type of the data type information 13 are spliced, and the comma is used for separation to obtain a computeValue character string 16, wherein the computeValue refers to a variable used for integrating the data type information 13 to calculate the information of the MD5 value 14 attribute, and when the data type information 13 is not a structure or enumeration 134 (namely, is the basic data 131 or the array 133), the computeValue character string 16 is directly used as a parameter to be transmitted into an MD5Hex function to generate the MD5 value 14. If the data type information 13 is a structure or enumeration 134, it is also necessary to traverse the attribute members thereof, splice the name information of each member, the ID of the member data type information 13, the sequence information of the members, the identifier value information of the members, and the MD5 value 14 information of the members into a string set 17, as shown in fig. 4, for example, the string set 17 is named as a string set ms, then traverse the string set 17, splice the string set 17 to the computeValue string 16, and finally convert the computeValue string 16 into the MD5 value 14 through the MD5Hex function.
The above flow is logic for MD5 value 14 calculation of data type information 13, and when the data type is structure or enumeration 134, the MD5 value 14 of the member needs to be obtained when concatenating the member's string set 17. Thus, as shown in FIG. 5, an MD5 value 14 is generated for data type A, where data type A is an example of data type information 13, and it is first determined whether the data type information 13 is structure data 132 or enumeration 134, and if not, MD5 value 14 is generated directly from the above-described computational logic shown in FIG. 4. If data type A is structure data 132 or enumeration 134, it is necessary to traverse the attribute members before generating MD5, which generates MD5 values 14 according to the computational logic described above, i.e., recursively generates MD5 values 14 for the members. When the recursion is finished or there is no recursion, the data type a splices the name of the data type information 13, the identification of the data type information 13, the sub-class data ID of the data type information 13, the length of the data type information 13, and the array 133 type of the data type information 13 into a computeValue string 16 according to the logic shown in fig. 4, and then splices the member string set 17 into the computeValue string 16 in a circulating manner, and finally calls the MD5Hex function to generate the MD5 value 14 of the data type a. Meanwhile, after the data type A generates the MD5 value 14, the MD5 value 14 is set to the member for the member parent class to generate the MD5 value 14.
In the process of classifying the original data type information 13, the data type information 13 of the structure body and the enumeration 134 can be understood as being formed by combining and nesting the basic data 131, and the structure body and the enumeration 134 are converted into the MD5 value 14 of the basic data 131 through traversing, so that the MD5 value 14 corresponding to the basic data 131 is contained in the data type information 13.
Referring to fig. 4, in step S20, it is determined whether the data type information 13 belongs to the base data 131 or the array 133 according to the attribute information of the data type information 13, and the attribute information of the data type information 13 is concatenated to form the computeValue string 16 to generate the MD5 value 14.
In the attribute information of the data type information 13, distinction is made by a type field in which type=1 represents the type of the base data 131, type=2 represents the structure body, type=3 represents the array 133, and type=4 represents the enumeration 134. When the tool chain module 100 recognizes that the type field in the data type information 13 represents the base data 131 or the array 133, the attribute information pieces of the type=1 field and the type=3 field are directly spliced into the computeValue string 16, i.e., the step of judging the belonging category of the data type information 13 is skipped through the type field.
Referring to fig. 4 and 5, in step S20, a method for obtaining MD5 value 14 information of a member includes:
judging whether the data type information 13 is the structure data 132 or the enumeration 134;
if the data type information 13 is not the structure data 132 or the enumeration 134, generating an MD5 value 14 of the data type information 13 according to the computeValue string 16;
if the data type information 13 is the structure data 132 or the enumeration 134, traversing the attribute member information of the data type information 13, splicing the attribute member information to form a character string set 17, splicing the character string set to the computeValue character string 16, and generating the MD5 value 14 of the data type information 13 to which the attribute member belongs.
The tool chain module 100 supports the free selection of the data type information 13 of the member of the structure data 132, so when generating the MD5 value 14 of the member, the generation flow of the MD5 value 14 of fig. 5 is repeated, and the data type information 13 of the member is determined to generate the MD5 value 14, that is, recursively generate the MD5 value 14 of the member. When the recursion is finished, the data type a splices the name of the data type information 13, the identifier of the data type information 13, the sub-class data ID of the data type information 13, the length of the data type information 13, and the array 133 type of the data type information 13 into a computeValue string 16 according to the logic shown in fig. 4, and then circularly splices the member string set 17 into the computeValue string 16, and finally calls the MD5Hex function to generate the MD5 value 14 of the data type a.
Referring to fig. 2, in one embodiment, step S30 includes:
the tool chain module 100 queries the database for the presence of MD5 values 14 in the snapshot data 15;
if the same snapshot data 15 exists, the tool chain module 100 points to the queried snapshot data 15 when using the snapshot backup of the data type information 13,
if the same snapshot data 15 does not exist, the tool chain module 100 performs snapshot backup on the data type information 13.
In this embodiment, it is determined by the MD5 value 14 whether the snapshot of the data type information 13 of the currently published version information 12 in the tool chain module 100 is stored in the database, specifically, the MD5 value 14 of the data type information 13 used under the current version information 12 is obtained, by querying whether the MD5 value 14 exists in the data snapshot table, if the snapshot data 15 exists, the data under the version is not inserted again, and the method using the data type information 13 points to the queried snapshot data 15 when the snapshot backup is performed. If snapshot data 15 is not present, a snapshot backup is made of the data under that version.
Referring to fig. 2 and fig. 3, in an embodiment, in step S10, the tool chain module 100 can customize the name of the data type information 13 when creating the service 11, including:
if the data type information 13 is the basic data 131, selecting the basic data 131 represented by the corresponding data type information 13;
if the data type information 13 is the structural data 132, the name of the attribute member and the data type information 13 of the attribute member are customized;
if the data type information 13 is the array 133, designating the data type information 13 of the members of the array 133;
if data type information 13 is enumeration 134, the names and corresponding values of attribute members in enumeration 134 are specified.
Custom data refers only to the four broad categories of data type information 13 mentioned in the foregoing: names may be customized based on the base data 131, the structure data 132, the enumeration 134, and the array 133. The data type of the member may be specified if it is structure data 132, and the type of the member of array 133 may be specified if it is array 133. The specified data type information 13 may be existing data type information 13 or user-defined data type information 13.
Referring to fig. 6, an embodiment of the present invention further provides a system for determining generation of a data type snapshot, including:
the tool chain module 100, the user builds a service 11 through the tool chain module 100, and the content of the new service 11 comprises version information 12, method information and data type information 13;
an MD5 value 14 generation module, the MD5 value 14 generation module calculating an MD5 value 14 for generating data type information 13;
and the data snapshot module 300 is used for inquiring the MD5 value 14 of the data type information 13 in the snapshot data 15 of the database of the tool chain module 100, and judging whether to generate the data snapshot of the data type information 13 according to the inquiry result.
If the data snapshot module 300 queries the same snapshot data 15 in the database of the tool chain module 100, the snapshot backup is not performed on the data type information 13, and the queried snapshot data 15 is pointed when the data type information 13 is used; if the same snapshot data 15 is not found, a snapshot backup is performed on the data type information 13.
The capability of the tool chain module 100 to provide a user with a creation service and to perform association is a basic capability, and aims to enable the user of each original development domain to create, edit and manage a new service 11 in the tool chain module 100, so as to facilitate the integration and communication of services/applications.
Defining the name of the data type information 13 by the tool chain module 100, and selecting the basic data 131 represented by the data type information 13 if it belongs to the basic data 131; if not the base data 131, a category of the data type information 13 is selected: structure data 132 or array 133 or enumeration 134; if the data is the structure data 132, the name of the member and the type of the member data are customized; designating the data type of the members of array 133 if it is array 133; if enumeration 134, the member names and corresponding values in enumeration 134 are specified.
The user issues a new service 11 through the tool chain module 100, the new service 11 is calculated by the MD5 value 14 generation module according to the owned attribute information to generate a second MD5 value 14 according to the data type information 13 corresponding to the version information 12 of the new service 11, the calculated second MD5 value 14 is compared with the information of the first MD5 value 14 stored in the database in the tool chain module 100 through the data snapshot module 300, and the data snapshot module 300 judges whether to carry out snapshot backup on the data type information 13 corresponding to the first MD5 value 14 according to the difference between the first MD5 value 14 and the second MD5 value 14.
Referring to fig. 3 and 6, in one embodiment, the data type information 13 includes base data 131, structure data 132, an array 133, and an enumeration 134; when the data type information 13 is basic data 131 or an array 133, the MD5 value 14 generating module splices attribute information of the data type information 13 to form a calculated value computeValue character string 16, and transmits the computeValue character string 16 as a parameter to the MD5 value 14 generating module to calculate and generate an MD5 value 14; when the data type information 13 is the structure data 132 or the enumeration 134, the MD5 value 14 generation module traverses the attribute member information owned by the data type information 13, splices each attribute member information into the string set 17, traverses the string set 17, splices the string set 17 into the computeValue string 16, and converts the computeValue string 16 into the MD5 value 14 through the MD5 value 14 generation module.
The computeValue string 16 of the spliced data type information 13 is separated by commas to obtain a computeValue string 16, for example, the basic data 131 type carSpeed is passed through the name carSpeed of the spliced data type information 13, the identification (1) of the data type information 13, the sub-class data ID (1446679359929737218) of the data type information 13, the length (null) of the data type information 13, and the array 133 type (0) of the data type information 13, and the computeValue string 16 is passed into the MD5Hex function as a parameter to generate the MD5 value 14.
The embodiment of the invention further provides an electronic device, which comprises a memory and a processor, wherein at least one program is stored in the memory, and the at least one program is loaded and executed by the processor to realize the judging method of the data type snapshot generation based on the SOA service design tool chain module 100.
Fig. 6 shows a schematic diagram of a computer system suitable for use in implementing an embodiment of the invention. It should be noted that the computer system of the electronic device shown in fig. 6 is only an example, and should not impose any limitation on the functions and application scope of the embodiments of the present invention.
The present invention also provides a computer readable storage medium having stored therein at least one instruction that is loaded and executed by a processor to implement a method of determining the generation of a snapshot of a data type based on the SOA service design tool chain module 100 as previously described.
Another aspect of the present invention also provides a computer readable storage medium having stored thereon a computer program which, when executed by a processor, implements a method of determining the generation of a snapshot of a data type based on the SOA service design tool chain module 100 as described above. The computer-readable storage medium may be included in the electronic device described in the above embodiment or may exist alone without being incorporated in the electronic device.
Another aspect of the invention also provides a computer program product or computer program comprising computer instructions stored in a computer readable storage medium. The processor of the computer device reads the computer instructions from the computer-readable storage medium, and the processor executes the computer instructions, so that the computer device performs the data type snapshot generation determination method provided in the above embodiments.
The flowcharts and block diagrams in the figures illustrate the architecture, functionality, and operation of possible implementations of systems, methods and computer program products according to various embodiments of the present invention. Where each block in the flowchart or block diagrams may represent a module, segment, or portion of code, which comprises one or more executable instructions for implementing the specified logical function(s). It should also be noted that, in some alternative implementations, the functions noted in the block may occur out of the order noted in the figures.
In summary, according to the method, system, device and medium for judging data type snapshot generation provided by the invention, when the newly-built service 11 issues the version information 12, all the data type information 13 used under the version information 12 is acquired. And loops each data type information 13 to generate its MD5 value 14 and then queries whether it is already present in the database of the tool chain module 100 and if so, does not repeat the storage, indicating that the same data type snapshot is already in the database. If not, carrying out snapshot backup on all attribute information of the data type. Therefore, the problem that redundant data is generated due to snapshot backup of the data type information 13 when the new service 11 is released is avoided, the usability of the tool chain module 100 is improved, the storage space is saved, and the maintenance cost is reduced.
The above embodiments are merely illustrative of the principles of the present invention and its effectiveness, and are not intended to limit the invention. Modifications and variations may be made to the above-described embodiments by those skilled in the art without departing from the spirit and scope of the invention. Accordingly, it is intended that all equivalent modifications and variations of the invention be covered by the claims, which are within the ordinary skill of the art, be within the spirit and scope of the present disclosure.

Claims (14)

1. A method for determining generation of a snapshot of a data type, the method comprising:
s10, a service (11) is newly built in a service-oriented architecture SOA service design tool chain module (100);
s20, determining version information (12) of the newly-built service (11), acquiring data type information (13) included in the version information (12), then circulating each data type information (13), and calculating a message digest algorithm fifth version MD5 value (14) for generating the data type information (13);
s30, inquiring whether the MD5 value (14) exists in a data snapshot table of the data type information (13), if so, not generating a snapshot of the data type information (13) under the version information (12), and if not, carrying out snapshot backup of the data type information (13) under the version information (12).
2. The method according to claim 1, wherein the step S10 comprises:
-determining version information (12) of the new service (11) in the tool chain module (100);
-user-defining method information parameters in said version information (12) in said tool chain module (100);
-data type information (13) of the method information parameters in the tool chain module (100) is defined by a user.
3. The method according to claim 1, wherein the step S20 comprises:
splicing attribute information owned by the data type information (13);
separating the attribute information by comma to obtain a calculated value computeValue character string (16);
and transmitting the computeValue character string (16) as a parameter into an MD5 hash Hex function to generate the MD5 value (14).
4. A method according to claim 3, characterized in that the data type information (13) comprises basic data (131), structure data (132), arrays (133) and enumerations (134); in the step S20 of the above-mentioned process,
when the data type information (13) is basic data (131) or an array (133), the computeValue character string (16) is used as a parameter to be transmitted into an MD5Hex function to generate the MD5 value (14);
when the data type information (13) is structural data (132) or enumeration (134), traversing attribute member information owned by the data type information (13), splicing each attribute member information into a character string set (17), traversing the character string set (17), splicing the character string set (17) to the computeValue character string (16), and converting the computeValue character string (16) into the MD5 value (14) through an MD5Hex function.
5. The method according to claim 4, wherein the attribute information possessed by the data type information (13) includes name information of the data type information (13), identification information of the data type information (13), a sub-class data ID of the data type information (13), length information of the data type information (13), and array (133) type information of the data type information (13);
the attribute member information includes name information of the member, ID of the data type information (13) of the member, order information of the member, identifier value information of the member, and MD5 value (14) information of the member.
6. The method according to claim 5, wherein in the step S20, it is determined whether the data type information (13) belongs to basic data (131) or an array (133) by attribute information of the data type information (13), and the attribute information of the data type information (13) is spliced to form the computeValue string (16) to generate the MD5 value (14).
7. The method according to claim 5, characterized in that in said step S20, a method of acquiring said MD5 value (14) information of said member comprises:
judging whether the data type information (13) is structural body data (132) or enumeration (134);
-if the data type information (13) is not structure data (132) or enumeration (134), generating the MD5 value (14) of the data type information (13) from the computeValue string (16);
and if the data type information (13) is structural data (132) or enumeration (134), traversing the attribute member information of the data type information (13), splicing the attribute member information to form the character string set (17), splicing the character string set to the computeValue character string (16), and generating the MD5 value (14) of the data type information (13) to which the attribute member belongs.
8. The method according to claim 1, wherein the step S30 comprises:
the tool chain module (100) queries a database for the presence of the MD5 value (14) in snapshot data (15);
if the same snapshot data (15) exists, the tool chain module (100) points to the queried snapshot data (15) when using the snapshot backup of the data type information (13),
if the same snapshot data (15) does not exist, the tool chain module (100) performs snapshot backup on the data type information (13).
9. The method according to any one of claims 4 to 7, wherein in the step S10, the tool chain module (100) is capable of customizing the name of the data type information (13) when creating a service (11), comprising:
selecting the basic data (131) represented by the data type information (13) if the data type information (13) is the basic data (131);
if the data type information (13) is structural data (132), customizing the name of the attribute member and the data type information (13) of the attribute member;
-if said data type information (13) is an array (133), designating said data type information (13) of a member of said array (133);
if the data type information (13) is enumeration (134), designating names and corresponding values of the attribute members in the enumeration (134).
10. A system for determining the generation of a snapshot of a data type, comprising:
a tool chain module (100), wherein a user establishes a service (11) through the tool chain module (100), and the content of the established service (11) comprises version information (12), method information and data type information (13);
an MD5 value generation module (200), wherein the MD5 value generation module (200) calculates and generates an MD5 value (14) of the data type information (13);
and the data snapshot module (300) queries the MD5 value (14) of the data type information (13) in snapshot data (15) of the database of the tool chain module (100), and judges whether to generate a data snapshot of the data type information (13) according to a query result.
11. The system of claim 10, wherein if the data snapshot module (300) queries the database of the tool chain module (100) for the same snapshot data (15), the data type information (13) is not snapshot backed up and the queried snapshot data (15) is pointed to when the data type information (13) is used; if the same snapshot data (15) is not queried, snapshot backup is carried out on the data type information (13).
12. The system of claim 10, wherein the data type information (13) includes base data (131), structure data (132), arrays (133), and enumerations (134);
when the data type information (13) is basic data (131) or an array (133), the MD5 value generating module (200) splices attribute information of the data type information (13) to form a computeValue character string (16), and transmits the computeValue character string (16) as a parameter to the MD5 value generating module (200) to calculate and generate the MD5 value (14);
when the data type information (13) is structural data (132) or enumeration (134), the MD5 value generation module (200) traverses attribute member information owned by the data type information (13), splices each attribute member information into a character string set (17), traverses the character string set (17), splices the character string set (17) into the computeValue character string (16), and converts the computeValue character string (16) into the MD5 value (14) through the MD5 value generation module (200).
13. An electronic device, comprising:
a memory and a processor, the memory having stored therein at least one program that is loaded and executed by the processor to implement the method of any one of claims 1 to 9.
14. A computer readable storage medium having stored therein at least one instruction that is loaded and executed by a processor to implement the method of any one of claims 1 to 9.
CN202310056820.1A 2023-01-18 2023-01-18 Judgment method, system, equipment and medium for data type snapshot generation Pending CN116010170A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202310056820.1A CN116010170A (en) 2023-01-18 2023-01-18 Judgment method, system, equipment and medium for data type snapshot generation

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202310056820.1A CN116010170A (en) 2023-01-18 2023-01-18 Judgment method, system, equipment and medium for data type snapshot generation

Publications (1)

Publication Number Publication Date
CN116010170A true CN116010170A (en) 2023-04-25

Family

ID=86019174

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202310056820.1A Pending CN116010170A (en) 2023-01-18 2023-01-18 Judgment method, system, equipment and medium for data type snapshot generation

Country Status (1)

Country Link
CN (1) CN116010170A (en)

Similar Documents

Publication Publication Date Title
CN106951430B (en) Account table query method and device
US20190129734A1 (en) Data collection workflow extension
US5822747A (en) System and method for optimizing database queries
US20060265720A1 (en) Method, system, and web service broker for dynamic web service invocation
US10453165B1 (en) Computer vision machine learning model execution service
US9659108B2 (en) Pluggable architecture for embedding analytics in clustered in-memory databases
JP2002251307A (en) Database management system, inquiry method in database management system and inquiry execution program in database management system
US7020659B2 (en) System and method for managing bi-directional relationships between objects
US20090049080A1 (en) Relationship management for data modeling in an integrated development environment
CN110737674A (en) Visual chart query method, device and equipment and computer storage medium
KR20220011134A (en) Visualization method and related device
US20170147539A1 (en) Generation apparatus, program, and generation method
CN111625273A (en) Configuration file modification method and device of semiconductor equipment
CN111026670A (en) Test case generation method, test case generation device, and storage medium
US6980941B2 (en) Method and computer program product for realizing a system specification which is described in a system description language
CN113568604B (en) Method and device for updating wind control strategy and computer readable storage medium
CN113159618A (en) Rule engine design method and device with separated technical view angles
CN116010170A (en) Judgment method, system, equipment and medium for data type snapshot generation
US9047391B2 (en) Searching apparatus, searching method, and computer program product
EP1701260A1 (en) System and method for building a deployable component based application
US20040194022A1 (en) Kernel configuration tool
CN112540995A (en) Data updating method, electronic device and storage medium
CN106775629B (en) Search file generation method and device
KR102015545B1 (en) System for analysing the effect of source code modification
CN108170415B (en) Light application program creating method based on configurable control

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination