WO2023193135A1 - 业务编码解释织入方法、业务服务系统和存储介质 - Google Patents

业务编码解释织入方法、业务服务系统和存储介质 Download PDF

Info

Publication number
WO2023193135A1
WO2023193135A1 PCT/CN2022/085291 CN2022085291W WO2023193135A1 WO 2023193135 A1 WO2023193135 A1 WO 2023193135A1 CN 2022085291 W CN2022085291 W CN 2022085291W WO 2023193135 A1 WO2023193135 A1 WO 2023193135A1
Authority
WO
WIPO (PCT)
Prior art keywords
data
business
mapping
data acquisition
coding
Prior art date
Application number
PCT/CN2022/085291
Other languages
English (en)
French (fr)
Inventor
沈夏平
Original Assignee
京东方科技集团股份有限公司
重庆京东方智慧科技有限公司
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 京东方科技集团股份有限公司, 重庆京东方智慧科技有限公司 filed Critical 京东方科技集团股份有限公司
Priority to CN202280000697.5A priority Critical patent/CN117203609A/zh
Priority to PCT/CN2022/085291 priority patent/WO2023193135A1/zh
Publication of WO2023193135A1 publication Critical patent/WO2023193135A1/zh

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/40Transformation of program code
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/70Software maintenance or management
    • G06F8/73Program documentation
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/44Arrangements for executing specific programs

Definitions

  • the present disclosure relates to the field of display, and in particular to a business code interpretation and weaving method, a business service system and a computer-readable storage medium.
  • a public module In the business system, a public module is generally set up to maintain a set of business codes. Each business code will have its own coding explanation.
  • the business code is a public resource and is often referenced by the business module; when the business module references the business code, it not only The field value needs to be encoded, and the encoding interpretation value corresponding to the encoded field value also needs to be encoded.
  • the coded interpretation values corresponding to some coded field values will be modified in the public module, which will lead to coded references.
  • the business module needs to synchronously modify the coding interpretation value of the corresponding coding field value, which will increase the coupling and maintenance costs between modules.
  • the workload of coding interpretation and maintenance will also increase accordingly.
  • embodiments of the present disclosure provide a service coding interpretation and weaving method, which includes:
  • the step of interpreting and mapping the coding field value of the preset service coding field includes:
  • the coding interpretation value corresponding to the coding field value is obtained according to the pre-stored mapping data.
  • the mapping data includes different coding field values and the coding interpretation value corresponding to each coding field value.
  • the method before the step of interpreting and mapping the coding field value of the preset service coding field, the method further includes:
  • mapping data from the storage server and store the mapping data in the cache.
  • the step of obtaining the coding interpretation value corresponding to the coding field value according to the pre-stored mapping data includes:
  • the method further includes:
  • mapping data in the cache and the storage server are synchronously modified.
  • the step of obtaining mapping data from the storage server includes:
  • a piece of correspondence data includes a coded field value and its corresponding coded interpretation value
  • mapping data Correspondence data returned by each slave processing unit is received and summarized to obtain the mapping data.
  • the step of generating multiple data acquisition tasks according to the total number of correspondence data includes:
  • the number n of data acquisition tasks to be generated is calculated, Indicates rounding up the quotient of q and p;
  • Correspondence data corresponding to the mapping data for each data acquisition task is determined, and each data acquisition task is generated, wherein the correspondence data corresponding to different data acquisition tasks are different.
  • the step of allocating multiple data acquisition tasks to multiple slave processing units includes:
  • each data acquisition task is sent to the corresponding slave processing unit.
  • the method further includes:
  • the preset business encoding field contained in the entity class object is configured with a custom serialization annotation, and the custom serialization annotation specifies the custom serializer;
  • the custom serialization annotation is the @JsonSerialize annotation
  • the custom serializer is a custom jackson serializer.
  • embodiments of the present disclosure also provide a computer-readable storage medium.
  • Computer-executable instructions are stored in the computer-readable storage medium.
  • the processor executes the computer-executable instructions, the steps in the first aspect are implemented. The methods described are provided.
  • embodiments of the present disclosure also provide a business service system, which includes: a background service module and a serialization module.
  • the background service module is configured with a business data acquisition interface, and the serialization module includes an interception calling unit. and custom serializer;
  • the business data acquisition interface is used to generate corresponding entity class objects in response to business data calling requests.
  • the preset business coding fields contained in the entity class objects are configured with custom serialization annotations.
  • the custom serialization Annotations specify custom serializers;
  • the interception calling unit is used to obtain the entity class object generated by the background service module
  • the custom serializer is used to interpret and map the coding field values of the preset business coding fields in the entity class object, obtain the coding interpretation value corresponding to the coding field value, and convert the coding interpretation value Added to the entity class object.
  • the custom serializer includes:
  • An obtaining unit used to obtain the coding field value of the preset service coding field
  • a mapping unit used to perform interpretation mapping on the coded field value to obtain the coded interpretation value corresponding to the coded field value
  • An adding unit is used to add the encoding interpretation value to the entity class object.
  • the mapping unit is specifically configured to obtain the coding interpretation value corresponding to the coding field value according to pre-stored mapping data.
  • the mapping data includes different coding field values and coding corresponding to each coding field value. Interpret value.
  • the system further includes: a maintenance module, the maintenance module includes: a data synchronization unit;
  • the data synchronization unit is used to obtain mapping data from the storage server and store the mapping data in the cache.
  • the mapping unit is specifically configured to obtain the encoding interpretation value corresponding to the encoding field value according to the mapping data stored in the cache.
  • the maintenance module further includes: a modification unit;
  • the modification unit is configured to synchronously modify the mapping data in the cache and the storage server in response to a mapping modification request.
  • the data synchronization unit includes: a master processing unit and a plurality of slave processing units;
  • the main processing unit includes:
  • the acquisition subunit is used to obtain the total number of corresponding relationship data contained in the mapping data stored in the storage server.
  • a piece of corresponding relationship data includes a coded field value and its corresponding coded interpretation value;
  • Allocation subunit used to allocate multiple data acquisition tasks to multiple slave processing units respectively
  • a summary subunit is used to receive the correspondence data returned by each of the slave processing units and summarize it to obtain the mapping data
  • the slave processing unit is configured to obtain correspondence data corresponding to the data acquisition task from the storage server according to the received data acquisition task, and feed back the obtained correspondence data to the main processing unit.
  • the generation subunit is specifically configured to: calculate the data acquisition to be generated based on the total number of correspondence data q and the number of correspondence data p corresponding to a preset single data acquisition task.
  • the number of tasks n means rounding up the quotient of q and p; and, determining the corresponding relationship data corresponding to the mapping data for each data acquisition task, and generating each of the data acquisition tasks, wherein the corresponding data for different data acquisition tasks is The corresponding relationship data are all different.
  • the allocation subunit is specifically used to:
  • each data acquisition task is sent to the corresponding slave processing unit.
  • the custom serializer further includes:
  • a serialization unit used to serialize the entity class object containing the encoding interpretation value to obtain serialized data
  • a sending unit configured to feed back the serialized data to the service requesting end.
  • the preset business encoding field contained in the entity class object is configured with a custom serialization annotation, and the custom serialization annotation specifies the custom serializer;
  • the custom serialization annotation is the @JsonSerialize annotation
  • the custom serializer is a custom jackson serializer.
  • the background service module is also configured with a new business data interface.
  • the new business data interface is used to add the business data included in the new business data request to the new business data request. in the business database.
  • Figure 1 is a schematic flow chart of a business processing method involved in related technologies
  • Figure 2 is a schematic flow chart of another business processing method involved in related technologies
  • FIG. 3 is a schematic diagram of an application environment involved in the technical solution of the present disclosure.
  • Figure 4 is a method flow chart of a service coding interpretation and weaving method provided by an embodiment of the present disclosure
  • Figure 5 is a method flow chart of another service coding interpretation and weaving method provided by an embodiment of the present disclosure.
  • Figure 6 is a flow chart of an optional implementation method of step S100 in the embodiment of the present disclosure.
  • Figure 7 is a flow chart of an optional implementation method of step S1002 in the embodiment of the present disclosure.
  • Figure 8 is a flow chart of an optional implementation method of step S1003 in the embodiment of the present disclosure.
  • Figure 9 is a method flow chart of another service coding interpretation and weaving method provided by an embodiment of the present disclosure.
  • Figure 10 is a method flow chart of yet another service coding interpretation and weaving method provided by an embodiment of the present disclosure.
  • Figure 11 is a system structural block diagram of a business service system provided by an embodiment of the present disclosure.
  • Figure 12 is a structural block diagram of the custom serializer in Figure 11;
  • Figure 13 is a structural block diagram of the maintenance module in the embodiment of the present disclosure.
  • Figure 14 is a schematic diagram of the business requester displaying the relevant business data of product A in the embodiment of the present disclosure
  • Figure 15 is a schematic diagram of the service requesting end displaying relevant service data of the face recognition service, blood pressure detection service, and body temperature detection service in an embodiment of the present disclosure.
  • an embodiment means that a particular feature, structure or characteristic described in connection with the embodiment may be included in at least one embodiment of the application.
  • the appearances of this phrase in various places in the specification are not necessarily all referring to the same embodiment, nor are separate or alternative embodiments mutually exclusive of other embodiments. It is explicitly and implicitly understood by those of ordinary skill in the art that the embodiments described in this application may be combined with other embodiments without conflict.
  • Words such as “connected”, “connected”, “coupled” and the like mentioned in this application are not limited to physical or mechanical connections, but may include electrical connections, whether direct or indirect.
  • the “plurality” mentioned in this application refers to two or more than two.
  • “And/or” describes the relationship between related objects, indicating that three relationships can exist. For example, “A and/or B” can mean: A alone exists, A and B exist simultaneously, and B exists alone. The character “/" generally indicates that the related objects are in an "or” relationship.
  • Figure 1 is a flow diagram of a business processing method involved in related technologies.
  • the business processing method involves a business requester and a business service system, where the business service system includes a background service module, a business database and a mapping database.
  • the background service module is configured with a mapping rule acquisition interface and a business data acquisition interface.
  • Business data is stored in the business database, and mapping data is stored in the mapping database.
  • the business data includes multi-line business records, and the business records at least include business coding fields and mapping data. Including different coding field values and coding interpretation values corresponding to each coding field value.
  • the specific process for the business requesting end to obtain business data through the business service system is as follows: First, the business requesting end obtains the mapping data through the mapping rule acquisition interface; then, the business requesting end sends the business data to the business data acquisition interface Data call request, the background service module queries the corresponding business data from the business database according to the business data call request, and encapsulates the queried business data into entity class objects according to the predefined interface return format, and converts the entity class object data Feedback to the business requesting end, in which the entity class object includes the encoding field value of the business encoding field, but does not include the encoding interpretation value of the encoding field value; then, the business requesting end performs the obtained mapping data based on the pre-obtained mapping data.
  • the coded field values of the business coded field in the entity class object are interpreted and mapped to obtain the coded interpretation value corresponding to the coded field value.
  • mapping data will be stored locally. There is no need to perform the step of obtaining the mapping data when requesting business data. Specifically, after receiving the entity class object data fed back by the backend service module, the business requesting end interprets and maps the coding field values of the business coding fields in the entity class object fed back by the backend service module based on locally stored mapping data.
  • mapping data in the background service module may need to be modified for certain reasons.
  • the mapping data stored in the business requesting end and the business service system need to be consistent.
  • the mapping data in the background service module is modified, the locally stored data of the business requesting end needs to be modified.
  • Mapping data is updated synchronously.
  • Figure 2 is a schematic flow chart of another business processing method involved in related technologies. As shown in Figure 2, unlike the technical solution shown in Figure 1, which places the interpretation mapping work on the business requesting end, the technical solution shown in Figure 2 will The interpretation mapping work is placed in the business service system, and the coding interpretation value is determined based on database correlation query technology.
  • the business data in the business database and the mapping data in the mapping database are associated in advance using the business encoding field.
  • the background The service module first queries the business data corresponding to the business data call request from the business database.
  • the queried business data includes the coding field value of the business coding field, but does not include the coding interpretation value of the coding field value, and then passes the business
  • the code triggers querying the coding interpretation corresponding to the coding field value of the business coding field from the mapping database, adds the coding interpretation to the pre-queried business data, and then sends the business data containing the coding interpretation value to the business requester.
  • the present disclosure provides a service coding interpretation and weaving method.
  • Figure 3 is a schematic diagram of an application environment involved in the technical solution of the present disclosure.
  • the application environment includes a business requester and a business service system.
  • the business requester can be used as a business module
  • the business service system can be used as a public module to use.
  • the business service system includes a background service module and a serialization module. A custom serializer is registered in the serialization module.
  • the business requester can send corresponding requests to the business service system to perform operations such as adding, modifying, and querying business data in the business service system.
  • the service requesting end can be specifically a web page end (also called a Web end) or an application end (also called an APP end).
  • the business service system includes a backend service module, a business database and a serialization module (also called a serialization framework).
  • the backend service module is configured with functional interfaces (also called software interfaces and API interfaces) with different functions.
  • the business requester can pass the backend
  • the functional interface provided by the service module is used to manage and access business data in the business database, such as adding, modifying, and querying business data.
  • Business data is stored in the business database, and the business data at least includes a business coding field. Of course, the business data may also include other fields.
  • the functional interface configured in the background service module at least includes a business data acquisition interface.
  • the business data acquisition interface is used to query the corresponding business data from the business database in response to the business data calling request sent by the business requesting end and according to the predefined
  • the interface return format is encapsulated as an entity class object, which at least includes a business coding field.
  • the user can send a business data calling request to the business service module through the business requesting end, and the business data calling request includes query conditions; the background service module performs a query on the business database based on the query conditions in the received business data calling request. Query the business data and obtain the query results, and then encapsulate the query results according to the interface return format of the configured business data acquisition interface to obtain the entity class object.
  • the interface return format of the business data acquisition interface is pre-designed.
  • the interface return format defines the specific format of the entity class object, such as which attribute fields are included, the data type of each field, etc., among which the interface return format It also defines that in the process of encapsulating query results, custom serialization annotations should be automatically added to the preset business coding fields (business coding fields set as needed).
  • the specific content of the custom serialization annotation has been pre-written into the code that is later used to define the interface return format of the business data acquisition interface.
  • the specific code of the custom serialization annotation depends on the serialization framework used by the business service system, and the custom serialization annotation adopts the standard annotation format provided by the serialization framework.
  • Figure 4 is a method flow chart of a business coding interpretation weaving method provided by an embodiment of the present disclosure. As shown in Figure 4, the business coding interpretation weaving method includes:
  • Step S101 Obtain the entity class object generated by the background service module.
  • the entity class object refers to an instance of the entity class (Class, with a preconfigured interface return format) fed back by the interface.
  • the preset business encoding field contained in the entity class object is configured with a custom serialization annotation, and the custom serialization annotation specifies a custom serializer.
  • the interface return format of the business data acquisition interface configured by the background service module is designed in advance, so that the business encoding field in the entity class object generated by the data acquisition interface is configured with custom serialization annotations.
  • serialization annotations to specify a custom serializer.
  • the custom serializer is a serializer written and customized by users according to their own needs.
  • the custom serializer is pre-registered in the serialization module. As a component in the serialization module, it can be used to operate on objects. Data conversion and other operations.
  • the "custom serializer” provided in the embodiment of the present disclosure is a new serializer that is pre-designed, added, and registered in the serialization module.
  • this custom serializer not only has the conventional serialization function, but also has the function of interpreting and mapping the preset business coding fields in the entity class object, and adding the interpretation mapping to the entity class object. For details, see Described later.
  • Step S102 Call the custom serializer to perform interpretation mapping on the coding field values of the preset business coding fields in the entity class object, obtain the coding interpretation value corresponding to the coding field value, and add the coding interpretation value to the entity class object.
  • Steps S101 and 102 are executed by the serialization module of the business service system.
  • the serialization module contains an interception calling unit.
  • the interception calling unit performs real-time monitoring of the data acquisition interface.
  • the interception calling unit can monitor the data acquisition interface of the background service module.
  • the custom serializer first obtains the encoding field value of the business encoding field configured with the custom serialization annotation, and then performs interpretation mapping processing on the encoding field value to obtain the encoding interpretation value corresponding to the encoding field value.
  • the business coding field in the embodiment of the present disclosure is a unique identifier of a business dictionary.
  • the coding field value of the business coding field can usually be composed of numbers or letters; the coding interpretation value is the interpretation information of the corresponding coding field value.
  • the business coding field is "category” and the value range of the coding field is "01" to "99".
  • Table 1 shows the coding field values and coding explanations of the product category. A mapping relationship table of values.
  • Table 1 A mapping relationship between coding field values and coding interpretation values of product categories
  • the technical solution of the present disclosure places the generation of code interpretation values in the business service system, so that the coupling degree between the business requester and the business service system is reduced; at the same time, because the business requester no longer needs Obtaining and storing mapping data eliminates the need to update the mapping data in the business request end, which can improve the data consistency of the system and reduce maintenance costs to a certain extent.
  • the technical solution of the present disclosure places the generation of coded field values in the backend service module, places the generation of coded interpretation values in the serialization module, and uses a custom serializer to configure the backend service module.
  • the encoded field value in the provided entity class object is used for interpretation mapping; that is to say, the custom serializer can dynamically generate the corresponding encoding interpretation value based on the encoded field value in the entity class object.
  • the coding interpretation value corresponding to the coding field value in the entity class object can be dynamically generated through a custom serializer, the coding interpretation value does not need to be specified in the entity class object provided by the background service module, so there is no need to specify the business data and Mapping data is associated to decouple business data from mapping data, which facilitates later data maintenance.
  • the background service module generates entity class objects containing business encoding fields and custom annotations, and then calls the custom serializer through the serialization module to interpret and map the encoding field values, and adds the encoding field values to the entity.
  • its running process is faster and the overall performance of the system is better.
  • the technical solution of the present disclosure has the characteristics of high data consistency, good maintainability, low coupling, and good performance.
  • the custom serialization module can add the preset business encoding field value to the entity class object.
  • the above-mentioned explanation of the relevant information of the mapping failure is used to remind the business requesting end that has the permission to modify the mapping data to update the mapping data in the mapping database.
  • the serialization module is a jackson serialization module
  • the custom serialization annotation is the @JsonSerialize annotation
  • the custom serializer is a custom jackson serializer.
  • the serialization framework used by the business service system is the Json serialization framework.
  • the Json serialization framework has the advantages of good readability, simplicity and ease of use, good scalability, good compatibility, and cross-language (structured data can be exchanged between multiple languages).
  • the entity class object generated by the background service module is a JAVA entity class object, and the JAVA entity class object contains the @JsonSerialize annotation.
  • Object identify the @JsonSerialize annotation in the Json entity class object, and then call the corresponding custom jackson serializer according to the content of the @JsonSerialize annotation to further process the Json entity class object.
  • serialization module in this disclosure can also be other types of serialization modules.
  • types of custom serialization annotations and custom serializers also change accordingly. No more examples here.
  • step S102 specifically includes: obtaining the coding interpretation value corresponding to the coding field value according to the pre-stored mapping data.
  • the mapping data includes different coding field values and the coding interpretation value corresponding to each coding field value.
  • the mapping data is stored in cache in advance. That is, a custom serializer can interpret and map encoded field values based on the mapping data stored in the cache.
  • the business service system caches the mapping data in advance; the custom serializer interprets and maps the encoded field value by calling the mapping data in the cache.
  • the mapping data is stored in the cache in advance. Since the data in the cache runs at an extremely high speed, the mapping speed can be effectively improved by calling the mapping data in the cache to interpret and map the encoded field values. , which is helpful to improve system performance.
  • Figure 5 is a method flow chart of another service coding interpretation weaving method provided by an embodiment of the present disclosure. As shown in Figure 5, the method shown in Figure 5 not only includes the above steps S101 and step S102, but also includes before step S101 Step S100.
  • Step S100 Obtain mapping data from the storage server and store the mapping data in the cache.
  • a mapping database is provided in the storage server, so that the mapping data is stored in the storage server;
  • the storage server may be composed of a cluster of distributed storage devices.
  • Step S100 may be performed by the maintenance module of the business service system.
  • the maintenance module can obtain the mapping data from the storage server again and store it in the cache.
  • step S100 includes:
  • Step S1001 Obtain the total number of correspondence data contained in the mapping data stored in the storage server.
  • a piece of correspondence data includes a coding field value and its corresponding coding interpretation value.
  • the name of the database (essentially a data table) corresponding to the mapping data can be used as an index to query the total number of corresponding relationship data contained in the mapping database from the storage server.
  • Step S1002 Generate multiple data acquisition tasks according to the total number of correspondence data.
  • step S1002 includes:
  • Step S10021 Calculate the number n of data acquisition tasks to be generated based on the total number of correspondence data q and the number of correspondence data p corresponding to a preset single data acquisition task.
  • Step S10022 Determine the corresponding relationship data corresponding to the mapping data of each data acquisition task, and generate each data acquisition task, wherein the corresponding relationship data corresponding to different data acquisition tasks are different.
  • the corresponding relationship data corresponding to each data acquisition task is determined.
  • the mapping database in the mapping data can be divided into n partitions according to the preset number of corresponding relationship data p corresponding to a single data acquisition task.
  • the first partition corresponds to the 1st to pth corresponding relationship data in the mapping database
  • the second partition corresponds to the p+1 to 2pth corresponding relationship data in the mapping database
  • the n-1th The partition corresponds to the (n-2)*p+1 ⁇ (n-1)p corresponding relationship data in the mapping database
  • the n-th partition corresponds to the (n-1)*p+1 ⁇ q corresponding relationship in the mapping database. data. Then, establish a one-to-one correspondence between n data acquisition tasks and n partitions, thereby determining the corresponding data of each data acquisition task in the mapped data, and generating a corresponding data acquisition task.
  • the corresponding relationship data corresponding to the mapping data of each data acquisition task can also be allocated based on other methods, and the present disclosure does not limit this. It is only necessary to ensure that the sum of the corresponding relationship data corresponding to all data acquisition tasks can constitute complete mapping data.
  • Step S1003 Allocate multiple data acquisition tasks to multiple slave processing units respectively, so that each slave processing unit acquires correspondence data corresponding to the data acquisition tasks from the storage server according to the received data acquisition tasks.
  • step S1003 includes:
  • Step S10031 Determine the number of available slave processing units and the node address of each slave processing unit.
  • Step S10032 Determine the allocation number corresponding to each data acquisition task.
  • the allocation number S_i corresponding to the i-th data acquisition task Hash(M_i)%j
  • M_i represents the task number corresponding to the i-th data acquisition task
  • j represents the number of available slave processing units
  • Hash(M_i ) means performing a hash operation on the task number M_i corresponding to the i-th data acquisition task
  • % means performing a remainder operation, 1 ⁇ i ⁇ n.
  • Step S10033 Determine the node address corresponding to each data acquisition task based on the pre-obtained number-address correspondence relationship data.
  • the number-address correspondence relationship data includes different assigned numbers and their corresponding node addresses.
  • multiple data acquisition tasks can also be allocated to multiple slave processing units based on other allocation methods, such as random allocation, average allocation, or load balancing considerations based on multiple slave processing units. Allocation.
  • Step S10034 Send each data acquisition task to the corresponding slave processing unit according to the node address corresponding to each data acquisition task.
  • Step S1004 Receive correspondence data returned by each slave processing unit and summarize them to obtain mapping data.
  • Each slave processing unit obtains the correspondence data corresponding to the data acquisition task from the storage server according to the received data acquisition task, and feeds the obtained correspondence data back to the main processing unit.
  • the main processing unit performs processing on the slave processing unit.
  • the returned correspondence data is summarized to obtain complete mapping data.
  • the slave processing unit first serializes the correspondence data obtained after processing the data acquisition task through the Protostuff serialization component to convert the correspondence data into a binary data stream, and then sends it to the main processing unit This binary data stream. Because the amount of data in the binary data stream is relatively small, it can be transmitted quickly. After the main processing unit receives the binary data stream sent by the slave processing unit, it converts the binary data stream into corresponding relationship data through deserialization processing of the Protostuff serialization component.
  • Figure 9 is a method flow chart of another service coding interpretation weaving method provided by an embodiment of the present disclosure. As shown in Figure 9, the method shown in Figure 9 not only includes the above-mentioned steps S101 and S102, but also includes steps S103 and S104. , only step S103 and step S104 will be described in detail below.
  • Step S103 Serialize the entity class object containing the coded interpretation value to obtain serialized data.
  • Step S104 Feed back the serialized data to the service requesting end.
  • Step S103 and step S104 are also executed by the serialization module of the business service system.
  • the custom serializer serializes the entity class object with the coded interpretation value, obtains the serialized data, and then sends the serialized data to the business requester. Subsequently, the business requesting end can restore the entity class object by deserializing the received serialized data, and then obtain the business data to be queried (including the coding field value of the preset business coding field and the corresponding coding Interpretation value).
  • the purpose of serializing data is to store entity objects across platforms and transmit them over the network (data can also be transmitted in distributed application systems), or to store entity objects in binary characters. Stored on the hard disk as a sequence of sections.
  • the business requester should also support the Json serialization framework to ensure that the business requester can convert the Json string into JAVA through deserialization processing.
  • Entity class object Specifically, the business requester is installed with related programs of the Json serialization framework. The business requester can first convert the Json string into a Json entity class object through the deserialization component that comes with the Json serialization framework, and then convert the Json entity class into The object is converted into a JAVA entity class object, and the business data contained in the JAVA entity class object is obtained (including coded field values and coded interpretation values).
  • serialization processing is the process of converting entity class objects into byte sequences. Through serialization processing, the integrity and deliverability of entity class objects can be ensured when transferring and saving objects. , convert entity class objects into ordered byte streams for transmission over the network or saving in local files. Deserialization processing is the process of restoring a byte sequence into an entity class object (for example, first converting a Json string into a Json entity class object, and then converting a Json entity class object into a JAVA entity class object). According to the byte stream The saved object status and description information are reconstructed through deserialization.
  • the service requester is configured with a request result display interface. After the business requester obtains the JAVA entity class object through deserialization, the business data content contained in the JAVA entity class object can be displayed according to actual needs. At this time, the user can obtain the relevant content of the queried business data (including the encoding field value and its corresponding encoding interpretation value) through the display interface of the business requester.
  • Figure 10 is a method flow chart of yet another service coding interpretation weaving method provided by an embodiment of the present disclosure. As shown in Figure 10, the method shown in Figure 10 not only includes the above-mentioned steps S101 and S102, but also includes step S105. The following only Step S105 is described in detail.
  • Step S105 In response to the mapping modification request, synchronously modify the mapping data in the storage server and cache.
  • the modification of the mapping data may include adding one or more pieces of coding field value-coding interpretation value correspondence data, modifying the coding interpretation value corresponding to one or more coding field values, modifying one or more coding The coded field value corresponding to the interpretation value, delete one or more coded field values - the corresponding relationship data of the coded interpretation value, etc.
  • Step S105 is performed by the maintenance module. After the mapping data in the mapping database is modified, the mapping data in the cache will also be modified synchronously to ensure the consistency of the two mapping data.
  • mapping data is only stored in the storage server or cache of the business service system, then in step S105, only the mapping data in the storage server or cache needs to be modified accordingly.
  • mapping data is only stored on the business service system side, and the business requesting end side does not store the mapping data, the technical solution of the present disclosure does not exist in the background service module as involved in related technologies. After the mapping data is modified, the mapping data stored locally on the business requesting end needs to be synchronously updated, which is beneficial to reducing maintenance costs.
  • FIG. 10 only illustrates the situation where step S105 is executed after step S101 and step S102, and this situation only serves as an example.
  • the execution order between step S105 and other steps is not limited.
  • step S105 may be executed before step S101, or between step S101 and step S102.
  • FIG. 11 is a system structural block diagram of a business service system provided by an embodiment of the present disclosure.
  • Figure 12 is a structural block diagram of the custom serializer in Figure 11.
  • Figure 13 is a structural block diagram of a maintenance module in an embodiment of the present disclosure.
  • Block diagram, as shown in Figures 11 to 13, the business service system 1 includes: a background service module 11 and a serialization module 12.
  • the background service module 1 is configured with a business data acquisition interface, and the serialization module 12 includes an interception calling unit 121 and a pre-processing module.
  • Custom serializer 122 registered in serialization module 12.
  • the business data acquisition interface is used to query the corresponding business data from the business database 14 in response to the business data calling request sent by the business requesting end, so that the background service module can generate the corresponding entity class object.
  • the included preset business encoding fields are configured with custom serialization annotations, and the custom serialization annotations specify a custom serializer.
  • the interception calling unit 121 is used to obtain the entity class object generated by the background service module 11.
  • the custom serializer 122 is used to perform interpretation mapping on the coding field value of the preset business coding field, obtain the coding interpretation value corresponding to the coding field value, and add the coding interpretation value to the entity class object.
  • the preset business encoding field contained in the entity class object is configured with a custom serialization annotation, and the custom serialization annotation specifies a custom serializer; the interception calling unit 121 is also used to process the obtained The entity class object is detected, and when it is detected that the entity class object contains a custom serialization annotation, the custom serializer 122 specified by the custom serialization annotation is called.
  • the serialization module 12 is a jackson serialization module
  • the custom serialization annotation is the @JsonSerialize annotation
  • the custom serializer is a custom jackson serializer
  • the custom serializer 122 includes: an acquisition unit 1221 , a mapping unit 1222 and an adding unit 1223 .
  • the acquisition unit 1221 is used to obtain the encoding field value of the preset service encoding field
  • the mapping unit 1222 is used to perform interpretation mapping on the encoding field value to obtain the encoding interpretation value corresponding to the encoding field value
  • the adding unit 1223 is used to interpret the encoding The value is added to the entity class object.
  • the custom serializer 122 is a custom jackson serializer
  • the adding unit 1223 is specifically a jackson generator.
  • mapping unit 1222 is specifically configured to obtain the coding interpretation value corresponding to the coding field value according to the pre-stored mapping data.
  • the mapping data includes different coding field values and the coding interpretation value corresponding to each coding field value.
  • mapping data is pre-stored in cache 16 .
  • the mapping unit 1222 is specifically configured to obtain the encoding interpretation value corresponding to the encoding field value according to the mapping data stored in the cache 16.
  • the mapping data is pre-stored in the cache 16. Since the data in the cache 16 runs at an extremely high speed, the encoding field value can be interpreted and mapped by calling the mapping data in the cache 16, which can be effectively Improving mapping speed will help improve system performance.
  • the business service system also includes: a maintenance module 13.
  • the maintenance module 13 includes: a data synchronization unit 131.
  • the data synchronization unit 131 is used to obtain mapping data from the storage server 15 and store the mapping data. in cache 16.
  • the maintenance module 13 also includes: a modification unit 132, which is configured to synchronously modify the mapping data in the storage server 15 and the cache 16 in response to the mapping modification request.
  • the data synchronization unit includes: a master processing unit 1311 and a plurality of slave processing units 1312.
  • the main processing unit 1311 includes an acquisition subunit 13111, a generation subunit 13112, an allocation subunit 13113, and a summary subunit 13114.
  • the acquisition subunit 13111 is used to obtain the total number of correspondence data contained in the mapping data stored in the storage server.
  • a piece of correspondence data includes a coding field value and its corresponding coding interpretation value.
  • the generation subunit 13112 is used to generate multiple data acquisition tasks according to the total number of correspondence data.
  • the allocation subunit 13113 is used to allocate multiple data acquisition tasks to multiple slave processing units respectively.
  • the aggregation subunit 13114 is used to receive the correspondence data returned by each slave processing unit and aggregate it to obtain mapping data.
  • the slave processing unit 1312 is configured to obtain correspondence data corresponding to the data acquisition task from the storage server according to the received data acquisition task, and feed back the obtained correspondence data to the main processing unit.
  • the generation subunit 13112 is specifically used to: calculate the number of data acquisition tasks to be generated based on the total number of correspondence data q and the number of correspondence data p corresponding to a preset single data acquisition task. n, means rounding up the quotient of q and p; and, determining the corresponding relationship data corresponding to the mapped data for each data acquisition task, and generating each data acquisition task, in which the corresponding relationship data corresponding to different data acquisition tasks are all different.
  • the allocation subunit 13113 is specifically used to: determine the number of available slave processing units 132 and the node address of each slave processing unit; determine the allocation number corresponding to each data acquisition task, wherein the i-th data acquisition
  • the allocation number corresponding to the task S_i Hash(M_i)%j
  • M_i represents the task number corresponding to the i-th data acquisition task
  • j represents the number of slave processing units that can be used
  • Hash(M_i) represents the processing of the i-th data
  • the task number M_i corresponding to the acquisition task is hashed, % represents the remainder operation, 1 ⁇ i ⁇ n; according to the pre-obtained number-address correspondence data, the node address corresponding to each data acquisition task is determined, number-address
  • the correspondence data includes different allocation numbers and their corresponding node addresses; and, according to the node address corresponding to each data acquisition task, each data acquisition task is sent to the corresponding slave processing unit 132 .
  • each unit and sub-unit in the maintenance module 13 please refer to the corresponding content in the previous method embodiment, and will not be described again here.
  • the custom serializer 122 also includes: a serialization unit 1224 and a sending unit 1225.
  • the serialization unit 1224 is used to serialize entity class objects containing coded interpretation values to obtain serialized data;
  • the sending unit 1225 is used to feed back the serialized data to the service requesting end 2.
  • the background service module 11 is also configured with a new business data interface; the new business data interface is used to add the business data included in the new business data request to the business database 14 in response to the new business data request. middle.
  • the business service system provided by the embodiments of the present disclosure has the advantages of high data consistency, good maintainability, low coupling, and good performance.
  • the business service system provided by the above embodiment is a business service system that includes a business classification dictionary code management function.
  • the coding field value of the business coding field in the business data stored in the business database is the business classification dictionary code.
  • the business requesting end (as a business module) can refer to the business classification dictionary code in the business service system to make business classification distinctions.
  • the business requesting end can send a business data call request to the business service system, and the business service system responds to the request by feeding back the corresponding business classification dictionary code and the corresponding dictionary code interpretation value (ie, the coding interpretation value) to the business requesting end. .
  • the coupling of the business classification dictionary code and the dictionary code interpretation value referenced by the business module can be effectively decoupled, so that the two are separated; during the code development process of the business module, technical developers, for the business module
  • the business table in the database only needs to reference the business classification dictionary code. There is no need to redundant business classification dictionary code interpretation fields in the business table. Therefore, there is no problem of spending a lot of cost to maintain the business classification dictionary code interpretation field. It ensures the maintainability of business code, effectively improves the efficiency of technical development, and reduces unnecessary code development.
  • the business request end is oriented to individual customers for their use.
  • an individual customer can make a business data call request to the business service system through the business requesting end (WEB end or APP end), and the business service system can respond to the business data calling request and feed back the corresponding business data to the business requesting end.
  • the individual customer requests the relevant business data of product A from the business service system through the business requester.
  • the relevant business data of product A is stored in the business database.
  • the relevant business data of product A includes a product name field, a product category field, Product barcode field, manufacturer field, product selling price field, etc.; among them, the product category field is the designed preset business coding field.
  • the service module queries the relevant business data of product A from the business database (where the coding field value of the product category field is "03") and generates an entity class object; the serialization module Intercept and call a custom serializer to interpret and map the encoding field value "03" of the product category field. For example, using the mapping relationship table (mapping data) shown in Table 1 above, the encoding corresponding to "03" can be determined The interpretation value is "Electrical Appliances".
  • FIG 14 is a schematic diagram of the business requesting end displaying the relevant business data of product A in the embodiment of the present disclosure. As shown in Figure 14, the business requesting end can display the relevant business data information of product A to the user through the interface IF, including the product
  • the product category of A is "Electrical Appliances" and can also include product name, product barcode, manufacturer, product selling price and other information.
  • the business request end faces business managers.
  • Specific businesses can include face recognition business, blood pressure detection business, body temperature detection business, etc.
  • the business data of each business includes the business name field and trigger method. Fields, business details introduction fields.
  • the "trigger mode" field is used as the preset business coding field. It is assumed that the coding field values of the "trigger mode" field in the business data of the face recognition business, blood pressure detection business, and body temperature detection business stored in the business database are respectively " 100", "200" and "100".
  • Business managers can simultaneously query relevant business data of the face recognition business, blood pressure detection business, and body temperature detection business through the business requester.
  • the background service module responds to the business data call request and queries the face recognition business, The business data of blood pressure detection business and body temperature detection business, and generate corresponding entity class objects respectively; the serialization module intercepts all three entity class objects, and calls a custom serializer to " The coding field value of "Trigger mode" field is interpreted and mapped.
  • the coding field value in the pre-designed mapping database is "100” and the coding interpretation value corresponding to "daily timed trigger” is, and the coding interpretation value corresponding to "200” is "Trigger on the hour every hour”, then add the coding interpretation value "Daily scheduled trigger” corresponding to the trigger mode field "100" to the entity class object corresponding to the face recognition business, and add it to the entity class corresponding to the blood pressure detection business Add the coding interpretation value "Trigger on the hour every hour” corresponding to the trigger mode field "200” in the object, and add the coding interpretation value "Daily” corresponding to the trigger mode field "100” to the entity class object corresponding to the body temperature detection business.
  • FIG 15 is a schematic diagram of the service requesting end displaying relevant business data of the face recognition service, blood pressure detection service, and body temperature detection service in the embodiment of the present disclosure. As shown in Figure 15, the service requesting end can display the person to the user through the interface IF.
  • Related business data information of the face recognition business, blood pressure detection business, and body temperature detection business including the triggering method information of each business, and may also include the business name information of each business, business details introduction information, etc.
  • embodiments of the present disclosure also provide a computer-readable storage medium.
  • Computer-executable instructions are stored in the computer-readable storage medium.
  • the processor executes the computer-executable instructions, the implementation of any of the previous embodiments is achieved.
  • the technical solution provided for the business coding explanation weaving method, its implementation principle and beneficial effects are similar to those of the business coding explanation weaving method, please refer to the implementation principle and beneficial effects of the business coding explanation weaving method, here No further details will be given.
  • computer storage media includes volatile and nonvolatile media implemented in any method or technology for storage of information such as computer readable instructions, data structures, program modules or other data. removable, removable and non-removable media.
  • Computer storage media includes, but is not limited to, RAM, ROM, EEPROM, flash memory or other memory technology, CD-ROM, Digital Versatile Disk (DVD) or other optical disk storage, magnetic cassettes, tapes, disk storage or other magnetic storage devices, or may Any other medium used to store desired information and that can be accessed by a computer.
  • communication media typically embodies computer readable instructions, data structures, program modules or other data in a modulated data signal such as a carrier wave or other transport mechanism, and may include any information delivery media .
  • Example embodiments have been disclosed herein, and although specific terms are employed, they are used and should be interpreted in a general illustrative sense only and not for purpose of limitation. In some instances, it will be apparent to those skilled in the art that features, characteristics and/or elements described in connection with a particular embodiment may be used alone, or may be used in conjunction with other embodiments, unless expressly stated otherwise. Features and/or components used in combination. Accordingly, it will be understood by those skilled in the art that various changes in form and details may be made without departing from the scope of the present disclosure as set forth in the appended claims.

Landscapes

  • Engineering & Computer Science (AREA)
  • Software Systems (AREA)
  • Theoretical Computer Science (AREA)
  • General Engineering & Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Library & Information Science (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

本公开提供了一种业务编码解释织入方法,包括:获取后台服务模块生成的实体类对象;调用所述自定义序列化器对所述实体类对象内预设业务编码字段的编码字段值做解释映射,得到所述编码字段值所对应的编码解释值,并将所述编码解释值添加至所述实体类对象中。本公开还提供了一种业务服务系统和计算机可读存储介质。

Description

业务编码解释织入方法、业务服务系统和存储介质 技术领域
本公开涉及显示领域,特别涉及一种业务编码解释织入方法、业务服务系统和计算机可读存储介质。
背景技术
在业务系统内一般会设置公共模块去维护一套业务编码,每个业务编码都会有各自编码解释,业务编码属于一种公共资源,往往会被业务模块引用;业务模块在引用业务编码时,不仅需要编码字段值,还需要编码字段值所对应的编码解释值。
在实际应用中,随着业务发展以及管理者对编码字段值所代表含义的深入理解,就会在公共模块对部分编码字段值所对应的编码解释值进行修改,这样就会导致进行了编码引用的业务模块需要对相应编码字段值的编码解释值进行同步修改,这样会增加模块间的耦合度和维护成本。另外,随着业务模块的增多,编码解释维护工作量也会相应增大。
发明内容
第一方面,本公开实施例提供了一种业务编码解释织入方法,其中,包括:
获取后台服务模块生成的实体类对象;
调用所述自定义序列化器对所述实体类对象内的预设业务编码字段的编码字段值做解释映射,得到所述编码字段值所对应的编码解释值,并将所述编码解释值添加至所述实体类对象中。
在一些实施例中,对所述预设业务编码字段的编码字段值做解释映射的步骤包括:
根据预先存储的映射数据获取所述编码字段值所对应的编码解释值,所述映射数据包括不同编码字段值和各编码字段值所对应的编码解释值。
在一些实施例中,在对所述预设业务编码字段的编码字段值做解释映射的步骤之前,还包括:
从存储服务器中获取映射数据,并将所述映射数据存储于缓存内。
在一些实施例中,根据预先存储的映射数据获取所述编码字段值所对应的编码解释值的步骤包括:
根据缓存内所存储的所述映射数据获取所述编码字段值所对应的编码解释值。
在一些实施例中,所述方法还包括:
响应于映射修改请求,对所述缓存和所述存储服务器内的所述映射数据进行同步修改。
在一些实施例中,从存储服务器中获取映射数据的步骤包括:
获取所述存储服务器内所存储的映射数据所包含的对应关系数据总条数,一条对应关系数据包括一个编码字段值及其所对应的编码解释值;
根据所述对应关系数据总条数生成多个数据获取任务;
将多个所述数据获取任务分别分配给多个从属处理单元,以供各从属处理单元根据接收到的所述数据获取任务从所述存储服务器中获取与所述数据获取任务相对应的对应关系数据;
接收各所述从属处理单元所返回的对应关系数据,并进行汇总,以得到所述映射数据。
在一些实施例中,根据所述对应关系数据总条数生成多个数据获取任务的步骤包括:
根据所述对应关系数据总条数q和预先设置的单个数据获取任务所对应的对应关系数据条数p,计算出待生成的数据获取任务的数量n,
Figure PCTCN2022085291-appb-000001
表示对q与p的商值向上取整;
确定各数据获取任务在所述映射数据所对应的对应关系数据,并生成各所述数据获取任务,其中不同所示数据获取任务所对应的对应关系数据均不同。
在一些实施例中,将多个所述数据获取任务分别分配给多个从属处理单元的步骤包括:
确定可使用的从属处理单元的数量以及各所述从属处理单元的节点地址;
确定各所述数据获取任务所对应的分配编号,其中第i个数据获取任务所对应的分配编号S_i=Hash(M_i)%j,M_i表示第i个数据获取任务所对应的任务编号,j表示可使用的从属处理单元的数量,Hash(M_i)表示对第i个数据获取任务所对应的任务编号M_i作哈希运算,%表示求余运算;
根据预先获取的编号-地址对应关系数据,确定各所述数据获取任务所对应的节点地址,所述编号-地址对应关系数据包括不同所述分配编号及其对应的节点地址;
根据各所述数据获取任务所对应的节点地址,将各所述数据获取任务发送至对应的所述从属处理单元。
在一些实施例中,在将所述编码解释值添加至所述实体类对象中之后,还包括:
将包含有所述编码解释值的实体类对象进行序列化处理,得到序列化数据;
将所述序列化数据反馈给业务请求端。
在一些实施例中,所述实体类对象中所包含的预设业务编码字段配置有自定义序列化注解,所述自定义序列化注解指定所述自定义序列化 器;
所述自定义序列化注解为@JsonSerialize注解;
所述自定义序列化器为自定义jackson序列化器。
第二方面,本公开实施例还提供了一种计算机可读存储介质,所述计算机可读存储介质中存储有计算机执行指令,当处理器执行所述计算机执行指令时,实现第一方面中所提供的所述方法。
第三方面,本公开实施例还提供了一种业务服务系统,其中,包括:后台服务模块和序列化模块,所述后台服务模块配置有业务数据获取接口,所述序列化模块包括拦截调用单元和自定义序列化器;
所述业务数据获取接口,用于响应于业务数据调用请求生成相应的实体类对象,所述实体类对象中所包含的预设业务编码字段配置有自定义序列化注解,所述自定义序列化注解指定自定义序列化器;
所述拦截调用单元,用于获取后台服务模块生成的实体类对象;
所述自定义序列化器,用于对所述实体类对象内预设业务编码字段的编码字段值做解释映射,得到所述编码字段值所对应的编码解释值,并将所述编码解释值添加至所述实体类对象中。
在一些实施例中,所述自定义序列化器包括:
获取单元,用于获取所述预设业务编码字段的编码字段值;
映射单元,用于对所述编码字段值做解释映射,得到所述编码字段值所对应的编码解释值;
添加单元,用于将所述编码解释值添加至所述实体类对象中。
在一些实施例中,所述映射单元具体用于根据预先存储的映射数据获取所述编码字段值所对应的编码解释值,所述映射数据包括不同编码字段值和各编码字段值所对应的编码解释值。
在一些实施例中,所述系统还包括:维护模块,所述维护模块包括:数据同步单元;
所述数据同步单元用于从存储服务器中获取映射数据,并将所述映射数据存储于缓存内。
在一些实施例中,所述映射单元具体用于根据缓存内所存储的所述映射数据获取所述编码字段值所对应的编码解释值。
在一些实施例中,所述维护模块还包括:修改单元;
所述修改单元用于响应于映射修改请求,对所述缓存和所述存储服务器内的所述映射数据进行同步修改。
在一些实施例中,所述数据同步单元包括:主处理单元和多个从属处理单元;
所述主处理单元包括:
获取子单元,用于获取所述存储服务器内所存储的映射数据所包含的对应关系数据总条数,一条对应关系数据包括一个编码字段值及其所对应的编码解释值;
生成子单元,用于根据所述对应关系数据总条数生成多个数据获取任务;
分配子单元,用于将多个所述数据获取任务分别分配给多个从属处理单元;
汇总子单元,用于接收各所述从属处理单元所返回的对应关系数据,并进行汇总,以得到所述映射数据;
所述从属处理单元用于根据接收到的所述数据获取任务从所述存储服务器中获取与所述数据获取任务相对应的对应关系数据,并将获取到的对应关系数据反馈给所述主处理单元。
在一些实施例中,所述生成子单元具体用于:根据所述对应关系数据总条数q和预先设置的单个数据获取任务所对应的对应关系数据条数p,计算出待生成的数据获取任务的数量n,
Figure PCTCN2022085291-appb-000002
表示对q与p的 商值向上取整;以及,确定各数据获取任务在所述映射数据所对应的对应关系数据,并生成各所述数据获取任务,其中不同所示数据获取任务所对应的对应关系数据均不同。
在一些实施例中,所述分配子单元具体用于:
确定可使用的从属处理单元的数量以及各所述从属处理单元的节点地址;
确定各所述数据获取任务所对应的分配编号,其中第i个数据获取任务所对应的分配编号S_i=Hash(M_i)%j,M_i表示第i个数据获取任务所对应的任务编号,j表示可使用的从属处理单元的数量,Hash(M_i)表示对第i个数据获取任务所对应的任务编号M_i作哈希运算,%表示求余运算;
根据预先获取的编号-地址对应关系数据,确定各所述数据获取任务所对应的节点地址,所述编号-地址对应关系数据包括不同所述分配编号及其对应的节点地址;
以及,根据各所述数据获取任务所对应的节点地址,将各所述数据获取任务发送至对应的所述从属处理单元。
在一些实施例中,所述自定义序列化器还包括:
序列化单元,用于将包含有所述编码解释值的实体类对象进行序列化处理,得到序列化数据;
发送单元,用于将所述序列化数据反馈给业务请求端。
在一些实施例中,所述实体类对象中所包含的预设业务编码字段配置有自定义序列化注解,所述自定义序列化注解指定所述自定义序列化器;
所述自定义序列化注解为@JsonSerialize注解;
所述自定义序列化器为自定义jackson序列化器。
在一些实施例中,所述后台服务模块还配置有业务数据新增接口,所述业务数据新增接口用于响应于业务数据新增请求将业务数据新增请求中所包含的业务数据添加至业务数据库中。
附图说明
图1为相关技术所涉及的一种业务处理方法的流程示意图;
图2为相关技术所涉及的另一种业务处理方法的流程示意图;
图3为本公开技术方案所涉及的一种应用环境示意图;
图4为本公开实施例提供的一种业务编码解释织入方法的方法流程图;
图5为本公开实施例提供的另一种业务编码解释织入方法的方法流程图;
图6为本公开实施例中步骤S100的一种可选实现方法流程图;
图7为本公开实施例中步骤S1002的一种可选实现方法流程图;
图8为本公开实施例中步骤S1003的一种可选实现方法流程图;
图9为本公开实施例提供的另一种业务编码解释织入方法的方法流程图;
图10为本公开实施例提供的又一种业务编码解释织入方法的方法流程图;
图11为本公开实施例提供的一种业务服务系统的系统结构框图;
图12为图11中自定义序列化器的一种结构框图;
图13为本公开实施例中维护模块的一种结构框图;
图14为本公开实施例中业务请求端展示商品A的相关业务数据的一种示意图;
图15为本公开实施例中业务请求端展示人脸识别业务、血压检测业务、体温检测业务的相关业务数据的一种示意图。
具体实施方式
为使本领域的技术人员更好地理解本公开的技术方案,下面结合附图对本公开提供的一种业务编码解释织入方法、业务服务系统和计算机可读存储介质进行详细描述。
下面描述中的附图仅仅是本申请的一些示例或实施例,对于本领域的普通技术人员而言,在不付出创造性劳动的前提下,还可以根据这些附图将本申请应用于其他类似情景。此外,还可以理解的是,虽然这种开发过程中所作出的努力可能是复杂并且冗长的,然而对于与本申请公开的内容相关的本领域的普通技术人员而言,在本申请揭露的技术内容的基础上进行的一些设计,制造或者生产等变更只是常规的技术手段,不应当理解为本申请公开的内容不充分。
在本申请中提及“实施例”意味着,结合实施例描述的特定特征、结构或特性可以包含在本申请的至少一个实施例中。在说明书中的各个位置出现该短语并不一定均是指相同的实施例,也不是与其它实施例互斥的独立的或备选的实施例。本领域普通技术人员显式地和隐式地理解的是,本申请所描述的实施例在不冲突的情况下,可以与其它实施例相结合。
除非另作定义,本申请所涉及的技术术语或者科学术语应当为本申请所属技术领域内具有一般技能的人士所理解的通常意义。本申请所涉及的“一”、“一个”、“一种”、“该”等类似词语并不表示数量限制,可表示单数或复数。本申请所涉及的术语“包括”、“包含”、“具有”以及它们任何变形,意图在于覆盖不排他的包含;例如包含了一系列步骤或模块(单元)的过程、方法、系统、产品或设备没有限定于已列出的步骤或单元,而是可以还包括没有列出的步骤或单元,或可以还包括对于这些过程、方法、产品或设备固有的其它步骤或单元。本申请所 涉及的“连接”、“相连”、“耦接”等类似的词语并非限定于物理的或者机械的连接,而是可以包括电气的连接,不管是直接的还是间接的。本申请所涉及的“多个”是指两个或两个以上。“和/或”描述关联对象的关联关系,表示可以存在三种关系,例如,“A和/或B”可以表示:单独存在A,同时存在A和B,单独存在B这三种情况。字符“/”一般表示前后关联对象是一种“或”的关系。
图1为相关技术所涉及的一种业务处理方法的流程示意图,如图1所示,该业务处理方法涉及业务请求端和业务服务系统,其中业务服务系统包括后台服务模块、业务数据库和映射数据库,后台服务模块配置有映射规则获取接口和业务数据获取接口,业务数据库中存储有业务数据,映射数据库中存储有映射数据,业务数据包括多行业务记录,业务记录至少包括业务编码字段,映射数据包括不同编码字段值和各编码字段值所对应的编码解释值。
参见图1中步骤a1~a7,业务请求端通过业务服务系统获取业务数据的具体过程如下:首先,业务请求端通过映射规则获取接口获取映射数据;然后,业务请求端向业务数据获取接口发送业务数据调用请求,后台服务模块根据该业务数据调用请求从业务数据库中查询到相应业务数据,并按照预先定义的接口返回格式将查询到的业务数据封装为实体类对象,并将该实体类对象数据反馈给业务请求端,其中该实体类对象中包括有业务编码字段的编码字段值,但是不包括编码字段值的编码解释值;接着,业务请求端根据预先获取的映射数据,对所获取到的实体类对象中的业务编码字段的编码字段值进行解释映射,得到编码字段值所对应的编码解释值。
为简化处理流程,在业务请求端获取到映射数据后,会对映射数据进行本地存储,此后在请求业务数据时无需再进行获取映射数据的步骤。具体地,业务请求端在接收到后台服务模块所反馈实体类对象数据后, 基于本地所存储的映射数据对后台服务模块所反馈实体类对象中的业务编码字段的编码字段值进行解释映射。
随着系统的使用,基于某些原因会出现需要对后台服务模块内的映射数据进行修改的情况。为了保证业务请求端读出数据的一致性,需使得业务请求端和业务服务系统中所存储的映射数据一致,在后台服务模块内的映射数据发生修改后,需要对业务请求端本地所存储的映射数据进行同步更新。
通过实际应用发现,图1所示相关技术的技术方案会存在如下问题:1)业务请求端对业务服务系统的依赖性增大,业务请求端与业务服务系统之间的耦合度增加,业务请求端和业务服务系统维护难度增大;2)当某个业务请求端内映射数据更新不及时时,容易出现该业务请求端对业务编码字段的解释映射不正确,即系统的数据一致性较差;3)随着系统使用时间的增长,业务请求端的数量增多,映射数据的同步更新工作量增多,维护成本增高。
图2为相关技术所涉及的另一种业务处理方法的流程示意图,如图2所示,与图1中所示技术方案将解释映射工作放置于业务请求端不同,图2所示技术方案将解释映射工作放置于业务服务系统,基于数据库关联查询技术来确定编码解释值。
参见图2中步骤b1~b3,具体地,预先将业务数据库内业务数据和映射数据库内的映射数据利用业务编码字段进行关联,在业务请求端向业务数据获取接口发送业务数据调用请求后,后台服务模块先从业务数据库内查询出与业务数据调用请求相应的业务数据,此时查询出的业务数据包括有业务编码字段的编码字段值,但是不包括编码字段值的编码解释值,然后通过业务代码触发从映射数据库中查询业务编码字段的编码字段值所对应的编码解释,并将编码解释添加至预先查询出的业务数据中,然后将包含有编码解释值的业务数据发送给业务请求端。
图2所示相关技术的技术方案虽然能够有效改善图1中所示技术方案存在的业务请求端与业务服务系统之间的耦合度高、系统的数据一致性差、映射数据的同步更新工作量多的问题,但是图2所示技术方案仍存在如下问题:1)需将业务数据库内业务数据和映射数据库内的映射数据利用业务编码字段进行关联,导致业务数据库与映射数据库之间的耦合度增大,业务数据库与映射数据库的维护难度增大;2)基于数据库关联查询技术进行关联查询的运行过程较慢,导致系统的整体性能偏低。
为有效改善相关技术中存在的至少之一的技术问题,本公开提供了一种业务编码解释织入方法。
图3为本公开技术方案所涉及的一种应用环境示意图,如图3所示,该应用环境包括业务请求端和业务服务系统,业务请求端可作为业务模块来使用,业务服务系统可作为公共模块来使用。业务服务系统包括有后台服务模块和序列化模块,序列化模块内注册有自定义序列化器。
业务请求端可向业务服务系统发送相应请求,以对业务服务系统内的业务数据进行新增、修改、查询等操作。业务请求端具体可以为网页端(也称为Web端),也可以是应用端(也称为APP端)。业务服务系统包括后台服务模块、业务数据库和序列化模块(也称为序列化框架),后台服务模块配置有不同功能的功能接口(也称为软件接口、API接口),业务请求端可通过后台服务模块所提供的功能接口来实现对业务数据库内业务数据的管理和访问,例如对业务数据进行新增、修改、查询等。业务数据库中存储有业务数据,业务数据至少包括业务编码字段,当然业务数据还可以包括其他字段。
其中,后台服务模块所配置的功能接口中至少包括业务数据获取接口,业务数据获取接口用于响应于业务请求端所发送的业务数据调用请求从业务数据库中查询到相应业务数据并按照预先定义的接口返回格式封装为实体类对象,实体类对象中至少包括业务编码字段。具体地,用 户可通过业务请求端向业务服务模块发送业务数据调用请求,该业务数据调用请求中包括有查询条件;后台服务模块基于所接收到的业务数据调用请求中的查询条件对业务数据库进行业务数据查询,并得到查询结果,接着根据自身所配置的业务数据获取接口的接口返回格式对查询结果进行封装,得到实体类对象。
在本公开实施例中,对业务数据获取接口的接口返回格式进行了预先设计,接口返回格式定义了实体类对象的具体格式,例如包含哪些属性字段、各字段的数据类型等,其中接口返回格式内还定义了在对查询结果进行封装过程中要为预设业务编码字段(根据需要所设定的业务编码字段)自动添加自定义序列化注解。其中,自定义序列化注解的具体内容已预先写入至后用于定义业务数据获取接口的接口返回格式的代码中。其中,自定义序列化注解的具体代码取决于业务服务系统所使用的序列化框架,自定义序列化注解采用该序列化框架所提供的标准注解格式。
图4为本公开实施例提供的一种业务编码解释织入方法的方法流程图,如图4所示,该业务编码解释织入方法包括:
步骤S101、获取后台服务模块生成的实体类对象。
在本公开实施例中,实体类对象(Object)是指接口所反馈的实体类(Class,具有预先配置的接口返回格式)的实例。在一些实施例中,实体类对象中所包含的预设业务编码字段配置有自定义序列化注解,自定义序列化注解指定自定义序列化器。
在本公开实施例中,预先对后台服务模块所配置业务数据获取接口的接口返回格式进行了设计,使得数据获取接口所生成实体类对象内的业务编码字段配置有自定义序列化注解,该自定义序列化注解指定自定义序列化器。其中,自定义序列化器为用户根据自身需要所编写、自定义的一个序列化器,自定义序列化器预先注册于序列化模块内,作为序 列化模块内的一个组件,可用于对对象作数据转换等操作。
不同于序列化框架(即序列化模块)所自带的常规序列化器,在本公开实施例所提供的“自定义序列化器”为预先设计并添加、注册在序列化模块内的一个新组件,该自定义序列化器不但具备常规的序列化功能,还具备对实体类对象中的预设业务编码字段进作解释映射、以及将解释映射添加至实体类对象的功能,具体内容可参见后面描述。
步骤S102、调用自定义序列化器对实体类对象内预设业务编码字段的编码字段值做解释映射,得到编码字段值所对应的编码解释值,并将编码解释值添加至实体类对象中。
步骤S101和步骤102由业务服务系统的序列化模块来执行。具体地,序列化模块内包含有拦截调用单元,拦截调用单元对数据获取接口进行实时监控,在监控到后台服务模块的数据获取接口生成实体类对象时,可对后台服务模块的数据获取接口所生成实体类对象进行拦截,并在检测到检测到实体类对象包含有自定义序列化注解时,调用自定义序列化注解所指定的自定义序列化器,以使用该自定义序列化器对实体类对象作进一步处理。
具体地,自定义序列化器首先获取配置有自定义序列化注解的业务编码字段的编码字段值,然后对编码字段值进行解释映射处理,以得到编码字段值所对应的编码解释值。
需要说明的是,本公开实施例中的业务编码字段为一种业务字典的唯一标识,业务编码字段的编码字段值通常可由数字或者字母组成;编码解释值为对应的编码字段值的解释信息,可以包含英文、中文、数字、符号等。
作为一个示例,在对商品品类进行编码时,业务编码字段为“category”,编码字段值的取值范围为“01”~“99”,下述表1为商品品类的编码字段值与编码解释值的一种映射关系表。
表1.商品品类的编码字段值与编码解释值的一种映射关系表
编码字段值 编码解释值
01 水果类
02 饮品类
03 电器类
04 体育类
05 玩具类
06 洗护用品类
07 零食类
... ...
在实际应用中,可根据实际需要来对编码字段值和/或编码解释值进行新增、删减、修改等操作。
相较于图1所示相关技术,本公开的技术方案将编码解释值的生成放置于业务服务系统,使得业务请求端与业务服务系统之间的耦合度降低;同时,由于业务请求端无需再获取、存储映射数据,因而不再需要对业务请求端内映射数据进行更新的操作,可在一定程度上提升系统的数据一致性以及降低维护成本。
相较于图2所示相关技术,本公开的技术方案将编码字段值的生成放置于后台服务模块,将编码解释值的生成放置于序列化模块,通过自定义序列化器来对后台服务模块所提供实体类对象内的编码字段值作解释映;也就是说,自定义序列化器可以根据实体类对象内的编码字段值动态生成对应的编码解释值。由于实体类对象内的编码字段值所对应的编码解释值可以通过自定义序列化器来动态生成,故编码解释值无需在后台服务模块所提供实体类对象中指定,因而无需再对业务数据和映射数据进行关联,使得业务数据与映射数据之间解耦,方便于后期的数据 维护。另外,通过后台服务模块生成包含有业务编码字段和自定义注解的实体类对象,然后再通过序列化模块来调用自定义序列化器对编码字段值做解释映射,并将编码字段值添加至实体类对象内,其运行过程较快,系统的整体性能较佳。
基于上述内容可见,本公开的技术方案具备数据一致性高、可维护性好、耦合度低、性能佳的特定。
在一些实施例中,当映射数据中未记载有实体类对象内的编码字段值及其所对应的编码解释值时,自定义序列化模块可向实体类对象内添加对预设业务编码字段值的解释映射失败的信息,以提醒业务请求端该实体类对象中预设业务编码字段值的解释映射失败;同时,自定义序列化模块还可以向对映射数据具有修改权限的业务请求端发送用于描述前述解释映射失败的相关信息,以提醒对映射数据具有修改权限的业务请求端对映射数据库中的映射数据进行更新。
在一些实施例中,序列化模块为jackson序列化模块,自定义序列化注解为@JsonSerialize注解,自定义序列化器为自定义jackson序列化器。也就是说,业务服务系统所使用的序列化框架为Json序列化框架。Json序列化框架具备可读性好、简单易用、良好的可扩展性、良好的兼容性、跨语言(可以在多种语言之间交换结构化数据)等优势。
后台服务模块所生成的实体类对象为JAVA实体类对象,该JAVA实体类对象内包含有@JsonSerialize注解。序列化模块在对后台服务模块所生成的实体类对象进行拦截后,会通过Json序列化框架自带的转换函数JSONObject json=JSONObject.fromObject(obj),来将JAVA实体类对象转换为Json实体类对象;然后对该Json实体类对象内的@JsonSerialize注解进行识别,接着根据@JsonSerialize注解的内容调用相应的自定义jackson序列化器,以对Json实体类对象作进一步处理。
当然,本公开中序列化模块还可以为其他种类的序列化模块,此时 自定义序列化注解和自定义序列化器的类型也相应变化。此处不再一一举例。
在一些实施例中,在步骤S102中具体包括:根据预先存储的映射数据获取编码字段值所对应的编码解释值,映射数据包括不同编码字段值和各编码字段值所对应的编码解释值。可选地,映射数据预先存储于缓存中。也就是说,自定义序列化器可根据缓存中所存储的映射数据来对编码字段值进行解释映射。
在一些实施例中,业务服务系统预先对映射数据进行了缓存;自定义序列化器通过调用缓存内的映射数据来对编码字段值进行解释映射。在本公开实施例中,将映射数据预先存储在缓存内,由于缓存中的数据运行速度极高,因此通过调用缓存内的映射数据来对编码字段值进行解释映射的方式,可以有效提升映射速度,有利于提升系统性能。
图5为本公开实施例提供的另一种业务编码解释织入方法的方法流程图,如图5所示,图5所示方法不但包括上述步骤S101和步骤S102,且在步骤S101之前还包括步骤S100。
步骤S100、从存储服务器中获取映射数据,并将所述映射数据存储于缓存内。
在本公开实施例中,存储服务器内设置有映射数据库,以使得映射数据落盘存储于存储服务器中;其中,存储服务器可以由分布式存储设备集群所构成。
步骤S100可由业务服务系统的维护模块来执行。其中,当业务服务系统宕机或重启导致缓存内的数据被清空后,维护模块可从存储服务器中再次获取映射数据,并将其存储于缓存内。
图6为本公开实施例中步骤S100的一种可选实现方法流程图,如图6所示,在一些实施例中,步骤S100包括:
步骤S1001、获取存储服务器内所存储的映射数据所包含的对应关 系数据总条数,一条对应关系数据包括一个编码字段值及其所对应的编码解释值。
可选地,可将映射数据所对应数据库(本质为数据表)名称作为索引,从存储服务器中查询出映射数据库所包含的对应关系数据总条数。
步骤S1002、根据对应关系数据总条数生成多个数据获取任务。
图7为本公开实施例中步骤S1002的一种可选实现方法流程图,如图7所示,在一些实施例中,步骤S1002包括:
步骤S10021、根据对应关系数据总条数q和预先设置的单个数据获取任务所对应的对应关系数据条数p,计算出待生成的数据获取任务的数量n。
其中,
Figure PCTCN2022085291-appb-000003
表示对q与p的商值向上取整。p的具体取值可根据实际需要来进行设定和调整,例如n取值为10、100、1000等。
步骤S10022、确定各数据获取任务在映射数据所对应的对应关系数据,并生成各数据获取任务,其中不同所示数据获取任务所对应的对应关系数据均不同。
在确定了数据获取任务的数量n后,再确定各数据获取任务所对应的对应关系数据。作为一个示例,在确定了数据获取任务的数量n后,可根据预先设置的单个数据获取任务所对应的对应关系数据条数p,将映射数据内的映射数据库分割为n个分区。此时,第1个分区对应映射数据库内第1~第p条对应关系数据,第2个分区对应映射数据库内第p+1~第2p条对应关系数据,以此类推,第n-1个分区对应映射数据库内第(n-2)*p+1~(n-1)p条对应关系数据,第n个分区对应映射数据库内第(n-1)*p+1~q条对应关系数据。然后,将n个数据获取任务与n个分区建立一一对应关系,从而确定各数据获取任务在映射数据中所对应的对应关系数据,并生成相应的数据获取任务。
当然,本公开实施例中还可以基于其他方式来分配各数据获取任务在映射数据所对应的对应关系数据,本公开对此不作限定。仅需保证全部数据获取任务所对应的对应关系数据的总和,可以构成完整的映射数据即可。
步骤S1003、将多个数据获取任务分别分配给多个从属处理单元,以供各从属处理单元根据接收到的数据获取任务从存储服务器中获取与数据获取任务相对应的对应关系数据。
图8为本公开实施例中步骤S1003的一种可选实现方法流程图,如图8所示,在一些实施例中,步骤S1003包括:
步骤S10031、确定可使用的从属处理单元的数量以及各从属处理单元的节点地址。
步骤S10032、确定各数据获取任务所对应的分配编号。
其中,第i个数据获取任务所对应的分配编号S_i=Hash(M_i)%j,M_i表示第i个数据获取任务所对应的任务编号,j表示可使用的从属处理单元的数量,Hash(M_i)表示对第i个数据获取任务所对应的任务编号M_i作哈希运算,%表示求余运算,1≤i≤n。
步骤S10033、根据预先获取的编号-地址对应关系数据,确定各数据获取任务所对应的节点地址。
其中,编号-地址对应关系数据包括不同分配编号及其对应的节点地址。
需要说明的是,上述基于哈希运算求余方式来确定各数据获取任务所分配的从属处理单元的技术手段,其仅为本公开中的一种可选实施方案,其不会对本公开的技术方案产生限制。在本公开实施例中,还可以基于其他分配方式来将多个数据获取任务分配各多个从属处理单元,例如采用随机分配方式、平均分配方式、或基于多个从属处理单元的负载均衡考虑的分配方式。
步骤S10034、根据各数据获取任务所对应的节点地址,将各数据获取任务发送至对应的从属处理单元。
步骤S1004、接收各从属处理单元所返回的对应关系数据,并进行汇总,以得到映射数据。
各从属处理单元根据接收到的数据获取任务,从存储服务器中获取与数据获取任务相对应的对应关系数据,并将获取到的对应关系数据反馈给主处理单元,主处理单元对从属处理单元所返回的对应关系数据进行汇总,得到完整的映射数据。
在一些实施例中,从属处理单元先将在处理数据获取任务后得到的对应关系数据通过Protostuff序列化组件的序列化处理,以将对应关系数据转化为二进制数据流,然后再向主处理单元发送该二进制数据流。由于二进制数据流的数据量相对较小,故能够实现快速传输。主处理单元接收到从属处理单元所发送的二进制数据流后,通过Protostuff序列化组件的反序列化处理,以将二进制数据流转化为对应关系数据。
需要说明的是,上述通过多个从属处理单元对数据获取任务进行并行处理,可有效提升维护模块获取映射数据的处理速度。
图9为本公开实施例提供的另一种业务编码解释织入方法的方法流程图,如图9所示,图9所示方法不但包括上述步骤S101和步骤S102,还包括步骤S103和步骤S104,下面仅对步骤S103和步骤S104进行详细描述。
步骤S103、将包含有编码解释值的实体类对象进行序列化处理,得到序列化数据。
步骤S104、将序列化数据反馈给业务请求端。
步骤S103和步骤S104也由业务服务系统的序列化模块执行。
具体地,自定义序列化器将织入有编码解释值的实体类对象进行序列化处理,得到序列化数据,再将序列化数据发送给业务请求端。后续, 业务请求端通过对接收到的序列化数据进行反序列化处理,可以还原得到实体类对象,进而可以得到待查询的业务数据(包括有预设业务编码字段的编码字段值以及对应的编码解释值)。
在本公开实施例中,对数据进行序列化的目的是为了将实体类对象跨平台存储和进行网络传输(也可以在分布式应用系统中传递数据),也可以是将实体类对象以二进制字节序列的方式存储在硬盘上。
当两个“端”在进行远程通信时,彼此可以发送各种类型的数据。无论是何种类型的数据,都会以二进制序列的形式在网络上传送;发送方需要把这个类型数据(对象)转换为二进制字节序列,才能在网络上传送;接收方则需要把字节序列再恢复为对象。而进行跨平台存储和网络传输的方式就是输入/输出(I/O),而I/O支持的数据格式就是字节数组。由此可见,凡是需要进行“跨平台存储”和”网络传输”的数据,都需要进行序列化。本质上存储和网络传输都需要经过把一个对象状态保存成一种跨平台识别的字节格式,然后其他的平台才可以通过字节信息解析还原对象信息。接收方通过反序列化处理后,可将字符序列方式存储的数据转换成能够识别的对象信息。
仍以业务服务系统所使用的序列化框架为Json序列化框架为例,自定义jackson序列化器将编码解释值织入至Json实体类对象后,通过转换函数Stringstr=json.toString(),以将Json实体类对象传唤为Json字符串(即字节序列),并将Json字符串发送给业务请求端。
在业务服务系统所使用的序列化框架为Json序列化框架的情况下,业务请求端也应该支持Json序列化框架,以保证业务请求端能够通过反序列化处理,以将Json字符串转换为JAVA实体类对象。具体地,业务请求端内安装有Json序列化框架的相关程序,业务请求端可通过Json序列化框架自带的反序列化组件先将Json字符串转换为Json实体类对象,再将Json实体类对象转换为JAVA实体类对象,并得到JAVA实体类 对象所包含的业务数据(包括有编码字段值和编码解释值)。
需要说明的是,在本公开实施例中,序列化处理就是把实体类对象转换为字节序列的过程,通过序列化处理可在传递和保存对象时保证实体类对象的完整性和可传递性,将实体类对象转换为有序字节流,以便在网络上传输或者保存在本地文件中。反序列化处理就是把字节序列恢复为实体类对象的过程(例如,先将Json字符串转换为Json实体类对象,再将Json实体类对象转换为JAVA实体类对象),根据字节流中保存的对象状态及描述信息,通过反序列化重建对象。
在一些实施例中,业务请求端配置有请求结果展示界面。在业务请求端通过反序列化处理得到JAVA实体类对象后,可以根据实际需要来对JAVA实体类对象中所包含业务数据内容进行展示。此时,用户可通过业务请求端的展示界面获取所查询的业务数据的相关内容(包括有编码字段值及其对应的编码解释值)。
在实际实施本公开技术方案的过程中,仅需对业务服务系统所使用的序列化框架进行改进(包括在常规序列化框架的基础上添加“拦截调用单元”和“注册自定义序列化器”),而对于业务请求端所使用的序列化框架无需进行改进,因此本公开技术方案实施难度较小、便于实现。
图10为本公开实施例提供的又一种业务编码解释织入方法的方法流程图,如图10所示,图10所示方法不但包括上述步骤S101和步骤S102,还包括步骤S105,下面仅对步骤S105进行详细描述。
步骤S105、响应于映射修改请求,对存储服务器和缓存内的映射数据进行同步修改。
其中,对映射数据的修改可以包括新增一条多或条编码字段值-编码解释值的对应关系数据、修改某一个或多个编码字段值所对应的编码解释值、修改某一个或多个编码解释值所对应的编码字段值、删除一条多或条编码字段值-编码解释值的对应关系数据等。
步骤S105由维护模块来执行。在对映射数据库内映射数据进行修改后,还会对缓存内的映射数据进行同步修改,以保证两处映射数据的一致性。
需要说明的是,当仅在业务服务系统的存储服务器或缓存中存储有映射数据时,则在步骤S105中仅需对存储服务器或缓存中的映射数据作相应修改。
在本公开实施例中,由于映射数据仅存储于业务服务系统侧,而业务请求端侧没有存储映射数据,故本公开的技术方案不会存在如相关技术中所涉及的,在后台服务模块内的映射数据发生修改后需要对业务请求端本地所存储的映射数据进行同步更新的步骤,有利于降低维护成本。
需要说明的是,图10中仅示例性画出了步骤S105位于步骤S101和步骤S102之后执行的情况,该情况仅起到示例性作用。在本公开实施例中,对于步骤S105与其他步骤之间的执行顺序不作限定,例如步骤S105可位于步骤S101之前执行,或者位于步骤S101与步骤S102之间执行。
此外,通过对上述各实施例中不同步骤进行组合所得到的技术方案也应属于本公开的保护范围。例如,在一些实施例中,可同时包括上述步骤S100、步骤S101、步骤S102、步骤S103、步骤S104、步骤S105。
基于同一发明构思,本公开实施例还提供了一种业务服务系统,该业务服务系统即为前述的业务处理端。图11为本公开实施例提供的一种业务服务系统的系统结构框图,图12为图11中自定义序列化器的一种结构框图,图13为本公开实施例中维护模块的一种结构框图,如图11至图13所示,该业务服务系统1包括:后台服务模块11和序列化模块12,后台服务模块1配置有业务数据获取接口,序列化模块12包括拦截调用单元121和预先注册于序列化模块12中的自定义序列化器122。
其中,业务数据获取接口用于响应于业务请求端所发送的业务数据 调用请求,从业务数据库14中查询出对应的业务数据,以供后台服务模块生成相应的实体类对象,实体类对象中所包含的预设业务编码字段配置有自定义序列化注解,自定义序列化注解指定自定义序列化器。
拦截调用单元121用于获取后台服务模块11生成的实体类对象。
自定义序列化器122用于对预设业务编码字段的编码字段值做解释映射,得到编码字段值所对应的编码解释值,并将编码解释值添加至实体类对象中。
在一些实施例中,实体类对象中所包含的预设业务编码字段配置有自定义序列化注解,自定义序列化注解指定自定义序列化器;拦截调用单元121还用于对所获取到的实体类对象进行检测,并在检测到实体类对象包含有自定义序列化注解时,调用自定义序列化注解所指定的自定义序列化器122。
在一些实施例中,序列化模块12为jackson序列化模块,自定义序列化注解为@JsonSerialize注解;自定义序列化器为自定义jackson序列化器。
在一些实施例中,参见图12所示,自定义序列化器122包括:获取单元1221、映射单元1222和添加单元1223。其中,获取单元用1221于获取预设业务编码字段的编码字段值;映射单元1222用于对编码字段值做解释映射,得到编码字段值所对应的编码解释值;添加单元1223用于将编码解释值添加至实体类对象中。在自定义序列化器122为自定义jackson序列化器时,添加单元1223具体为jackson生成器。
进一步可选地,映射单元1222具体用于根据预先存储的映射数据获取编码字段值所对应的编码解释值,映射数据包括不同编码字段值和各编码字段值所对应的编码解释值。
在一些实施例中,映射数据预先存储于缓存16中。进一步可选地,映射单元1222具体用于根据缓存16内所存储的映射数据获取编码字段 值所对应的编码解释值。在本公开实施例中,将映射数据预先存储于缓存16内,由于缓存16中的数据运行速度极高,因此通过调用缓存16内的映射数据来对编码字段值进行解释映射的方式,可以有效提升映射速度,有利于提升系统性能。
继续参见图11和图13所示,业务服务系统还包括:维护模块13,维护模块13包括:数据同步单元131,数据同步单元131用于从存储服务器15中获取映射数据,并将映射数据存储于缓存16内。
在一些实施例中,维护模块13还包括:修改单元132,修改单元132用于响应于映射修改请求,对存储服务器15和缓存16内的映射数据进行同步修改。
参见图13所示,在一些实施例中,数据同步单元包括:主处理单元1311和多个从属处理单元1312。主处理单元1311包括获取子单元13111、生成子单元13112、分配子单元13113和汇总子单元13114。
其中,获取子单元13111用于获取存储服务器内所存储的映射数据所包含的对应关系数据总条数,一条对应关系数据包括一个编码字段值及其所对应的编码解释值。
生成子单元13112用于根据对应关系数据总条数生成多个数据获取任务。
分配子单元13113用于将多个数据获取任务分别分配给多个从属处理单元。
汇总子单元13114用于接收各从属处理单元所返回的对应关系数据,并进行汇总,以得到映射数据。
从属处理单元1312用于根据接收到的数据获取任务从存储服务器中获取与数据获取任务相对应的对应关系数据,并将获取到的对应关系数据反馈给主处理单元。
在一些实施例中,生成子单元13112具体用于:根据对应关系数据 总条数q和预先设置的单个数据获取任务所对应的对应关系数据条数p,计算出待生成的数据获取任务的数量n,
Figure PCTCN2022085291-appb-000004
表示对q与p的商值向上取整;以及,确定各数据获取任务在映射数据所对应的对应关系数据,并生成各数据获取任务,其中不同所示数据获取任务所对应的对应关系数据均不同。
在一些实施例中,分配子单元13113具体用于:确定可使用的从属处理单元132的数量以及各从属处理单元的节点地址;确定各数据获取任务所对应的分配编号,其中第i个数据获取任务所对应的分配编号S_i=Hash(M_i)%j,M_i表示第i个数据获取任务所对应的任务编号,j表示可使用的从属处理单元的数量,Hash(M_i)表示对第i个数据获取任务所对应的任务编号M_i作哈希运算,%表示求余运算,1≤i≤n;根据预先获取的编号-地址对应关系数据,确定各数据获取任务所对应的节点地址,编号-地址对应关系数据包括不同分配编号及其对应的节点地址;以及,根据各数据获取任务所对应的节点地址,将各数据获取任务发送至对应的从属处理单元132。
对于维护模块13中各单元和子单元的具体描述,可参见前面方法实施例中的相应内容,此处不再赘述。
再次参见图12所示,在一些实施例中,自定义序列化器122还包括:序列化单元1224和发送单元1225。其中,序列化单元1224用于将包含有编码解释值的实体类对象进行序列化处理,得到序列化数据;发送单元1225用于将序列化数据反馈给业务请求端2。
在一些实施例中,后台服务模块11还配置有业务数据新增接口;业务数据新增接口用于响应于业务数据新增请求将业务数据新增请求中所包含的业务数据添加至业务数据库14中。
基于前面实施例所描述内容可见,本公开实施例所提供的业务服务 系统具备数据一致性高、可维护性好、耦合度低、性能佳等优点。
作为一个具体应用场景,上述实施例所提供的业务服务系统为包含业务分类字典码管理功能的业务服务系统,业务数据库中所存储业务数据内的业务编码字段的编码字段值即为业务分类字典码,业务请求端(作为业务模块)可引用业务服务系统中的业务分类字典码做业务分类区分。具体地,业务请求端可通过向该业务服务系统发送业务数据调用请求,业务服务系统响应于该请求向业务请求端反馈相应的业务分类字典码以及对应的字典码解释值(即编码解释值)。
采用本公开的技术方案,能够有效的解除业务模块所引用业务分类字典码与字典码解释值的耦合,使得二者剥离开;技术开发人员在进行业务模块的代码开发过程中,针对业务模块的数据库内业务表,只需引用业务分类字典码即可,无需在业务表中冗余业务分类字典码解释字段,因而也不会存在耗费大量成本去对业务分类字典码解释字段进行维护的问题,保证了业务代码的可维护性,有效的提高了技术开发的工作效率,减少了不必要的代码开发。
作为另一个具体应用场景,业务请求端面向个人客户,以供个人客户使用。例如,个人客户可通过业务请求端(WEB端或APP端)向业务服务系统提出业务数据调用请求,业务服务系统可响应该业务数据调用请求,向业务请求端反馈相应业务数据。具体地,个人客户通过业务请求端向业务服务系统请求调用商品A的相关业务数据,在业务数据库内存储有商品A的相关业务数据,商品A的相关业务数据包括商品名称字段、商品品类字段、商品条码字段、生产厂家字段、商品售价字段等;其中,商品品类字段为所设计的预设业务编码字段,假定商品A的相关业务数据内商品品类字段的编码字段值为“03”;后台服务模块响应于业务数据调用请求,从业务数据库中查询出商品A的相关业务数据(其中,商品品类字段的编码字段值为“03”)并生成实体类对象;序列化 模块对该实体类对象进行拦截,并调用自定义序列化器对商品品类字段的编码字段值“03”进行解释映射,例如采用前述表1所示映射关系表(映射数据),可以确定出“03”所对应的编码解释值为“电器类”,将“03”所对应的编码解释值“电器类”添加至商品A所对应的实体类对象中,然后将其反馈给业务请求端。图14为本公开实施例中业务请求端展示商品A的相关业务数据的一种示意图,如图14所示,业务请求端可通过界面IF向用户展示商品A的相关业务数据信息,其中包括商品A的商品类别为“电器类”,还可以包括商品名称、商品条码、生产厂家、商品售价等信息。
作为另一个具体应用场景,业务请求端面向业务管理人员,具体业务可以包括人脸识别业务、血压检测业务、体温检测业务等,其中每一项业务的业务数据中包含有业务名称字段、触发方式字段、业务详情介绍字段。其中“触发方式”字段作为预设业务编码字段,假定业务数据库内所存储的人脸识别业务、血压检测业务、体温检测业务三者的业务数据内“触发方式”字段的编码字段值分别为“100”、“200”和“100”。业务管理人员可通过业务请求端来同时查询人脸识别业务、血压检测业务、体温检测业务的相关业务数据,后台服务模块响应于业务数据调用请求,分别从业务数据库中查询出人脸识别业务、血压检测业务、体温检测业务的业务数据,并分别生成相应的实体类对象;序列化模块对该三个实体类对象均进行拦截,并调用自定义序列化器对三个实体类对象内的“触发方式”字段的编码字段值进行解释映射,假定预先所设计映射数据库中编码字段值为“100”所对应的编码解释值为“每日定时触发”,“200”所对应的编码解释值为“每小时整点触发”,则向人脸识别业务所对应的实体类对象中添加触发方式字段“100”所对应的编码解释值“每日定时触发”,向血压检测业务所对应的实体类对象中添加触发方式字段“200”所对应的编码解释值“每小时整点触发”,向体温检测业务所 对应的实体类对象中添加触发方式字段“100”所对应的编码解释值“每日定时触发”,然后将添加有编码解释值的三个实体类对象反馈给业务请求端。图15为本公开实施例中业务请求端展示人脸识别业务、血压检测业务、体温检测业务的相关业务数据的一种示意图,如图15所示,业务请求端可通过界面IF向用户展示人脸识别业务、血压检测业务、体温检测业务的相关业务数据信息,其中包括各业务的触发方式信息,还可以包括各业务的业务名称信息、业务详情介绍信息等。
基于同一发明构思,本公开实施例还提供一种计算机可读存储介质,该计算机可读存储介质中存储有计算机执行指令,当处理器执行所述计算机执行指令时,实现前面任一实施例所提供的业务编码解释织入方法的技术方案,其实现原理以及有益效果与业务编码解释织入方法的实现原理及有益效果类似,可参见业务编码解释织入方法的实现原理及有益效果,此处不再进行赘述。
本领域普通技术人员可以理解,上文中所公开方法中的全部或某些步骤、系统、系统中的功能模块可以被实施为软件、固件、硬件及其适当的组合。在硬件实施方式中,在以上描述中提及的功能模块之间的划分不一定对应于物理组件的划分;例如,一个物理组件可以具有多个功能,或者一个功能或步骤可以由若干物理组件合作执行。某些物理组件或所有物理组件可以被实施为由处理器,如中央处理器、数字信号处理器或微处理器执行的软件,或者被实施为硬件,或者被实施为集成电路,如专用集成电路。这样的软件可以分布在计算机可读介质上,计算机可读介质可以包括计算机存储介质(或非暂时性介质)和通信介质(或暂时性介质)。如本领域普通技术人员公知的,术语计算机存储介质包括在用于存储信息(诸如计算机可读指令、数据结构、程序模块或其它数据)的任何方法或技术中实施的易失性和非易失性、可移除和不可移除介质。计算机存储介质包括但不限于RAM、ROM、EEPROM、闪存或其它存 储器技术、CD-ROM、数字多功能盘(DVD)或其它光盘存储、磁盒、磁带、磁盘存储或其它磁存储装置、或者可以用于存储期望的信息并且可以被计算机访问的任何其它的介质。此外,本领域普通技术人员公知的是,通信介质通常包含计算机可读指令、数据结构、程序模块或者诸如载波或其它传输机制之类的调制数据信号中的其它数据,并且可包括任何信息递送介质。
本文已经公开了示例实施例,并且虽然采用了具体术语,但它们仅用于并仅应当被解释为一般说明性含义,并且不用于限制的目的。在一些实例中,对本领域技术人员显而易见的是,除非另外明确指出,否则可单独使用与特定实施例相结合描述的特征、特性和/或元素,或可与其它实施例相结合描述的特征、特性和/或元件组合使用。因此,本领域技术人员将理解,在不脱离由所附的权利要求阐明的本公开的范围的情况下,可进行各种形式和细节上的改变。

Claims (23)

  1. 一种业务编码解释织入方法,其中,包括:
    获取后台服务模块生成的实体类对象;
    调用自定义序列化器对所述实体类对象内的预设业务编码字段的编码字段值做解释映射,得到所述编码字段值所对应的编码解释值,并将所述编码解释值添加至所述实体类对象中。
  2. 根据权利要求1所述的方法,其中,对所述预设业务编码字段的编码字段值做解释映射的步骤包括:
    根据预先存储的映射数据获取所述编码字段值所对应的编码解释值,所述映射数据包括不同编码字段值和各编码字段值所对应的编码解释值。
  3. 根据权利要求2所述的方法,其中,在对所述预设业务编码字段的编码字段值做解释映射的步骤之前,还包括:
    从存储服务器中获取映射数据,并将所述映射数据存储于缓存内。
  4. 根据权利要求3所述的方法,其中,根据预先存储的映射数据获取所述编码字段值所对应的编码解释值的步骤包括:
    根据缓存内所存储的所述映射数据获取所述编码字段值所对应的编码解释值。
  5. 根据权利要求4所述的方法,其中,还包括:
    响应于映射修改请求,对所述缓存和所述存储服务器内的所述映射数据进行同步修改。
  6. 根据权利要求3所述的方法,其中,从存储服务器中获取映射数据的步骤包括:
    获取所述存储服务器内所存储的映射数据所包含的对应关系数据总条数,一条对应关系数据包括一个编码字段值及其所对应的编码解释值;
    根据所述对应关系数据总条数生成多个数据获取任务;
    将多个所述数据获取任务分别分配给多个从属处理单元,以供各从属处理单元根据接收到的所述数据获取任务从所述存储服务器中获取与所述数据获取任务相对应的对应关系数据;
    接收各所述从属处理单元所返回的对应关系数据,并进行汇总,以得到所述映射数据。
  7. 根据权利要求6所述的方法,其中,根据所述对应关系数据总条数生成多个数据获取任务的步骤包括:
    根据所述对应关系数据总条数q和预先设置的单个数据获取任务所对应的对应关系数据条数p,计算出待生成的数据获取任务的数量n,
    Figure PCTCN2022085291-appb-100001
    表示对q与p的商值向上取整;
    确定各数据获取任务在所述映射数据所对应的对应关系数据,并生成各所述数据获取任务,其中不同所示数据获取任务所对应的对应关系数据均不同。
  8. 根据权利要求6所述的方法,其中,将多个所述数据获取任务分别分配给多个从属处理单元的步骤包括:
    确定可使用的从属处理单元的数量以及各所述从属处理单元的节点地址;
    确定各所述数据获取任务所对应的分配编号,其中第i个数据获取任务所对应的分配编号S_i=Hash(M_i)%j,M_i表示第i个数据获取任务所对应的任务编号,j表示可使用的从属处理单元的数量,Hash(M_i)表示对第i个数据获取任务所对应的任务编号M_i作哈希运算,%表示求余运算,1≤i≤n;
    根据预先获取的编号-地址对应关系数据,确定各所述数据获取任务所对应的节点地址,所述编号-地址对应关系数据包括不同所述分配编号及其对应的节点地址;
    根据各所述数据获取任务所对应的节点地址,将各所述数据获取任务发送至对应的所述从属处理单元。
  9. 根据权利要求1至8中任一所述的方法,其中,在将所述编码解释值添加至所述实体类对象中之后,还包括:
    将包含有所述编码解释值的实体类对象进行序列化处理,得到序列化数据;
    将所述序列化数据反馈给业务请求端。
  10. 根据权利要求1至9中任一所述的方法,其中,所述实体类对象中所包含的预设业务编码字段配置有自定义序列化注解,所述自定义序列化注解指定所述自定义序列化器;
    所述自定义序列化注解为@JsonSerialize注解;
    所述自定义序列化器为自定义jackson序列化器。
  11. 一种计算机可读存储介质,其特征在于,所述计算机可读存储介质中存储有计算机执行指令,当处理器执行所述计算机执行指令时,实现上述权利要求1至10中任一所述的方法。
  12. 一种业务服务系统,其中,包括:后台服务模块和序列化模块,所述后台服务模块配置有业务数据获取接口,所述序列化模块包括拦截调用单元和自定义序列化器;
    所述业务数据获取接口,用于响应于业务数据调用请求生成相应的实体类对象;
    所述拦截调用单元,用于获取后台服务模块生成的实体类对象;
    所述自定义序列化器,用于对所述实体类对象内预设业务编码字段的编码字段值做解释映射,得到所述编码字段值所对应的编码解释值,并将所述编码解释值添加至所述实体类对象中。
  13. 根据权利要求12所述的业务服务系统,其中,所述自定义序列化器包括:
    获取单元,用于获取所述预设业务编码字段的编码字段值;
    映射单元,用于对所述编码字段值做解释映射,得到所述编码字段值所对应的编码解释值;
    添加单元,用于将所述编码解释值添加至所述实体类对象中。
  14. 根据权利要求13所述的业务服务系统,其中,所述映射单元具体用于根据预先存储的映射数据获取所述编码字段值所对应的编码解释值,所述映射数据包括不同编码字段值和各编码字段值所对应的编码解释值。
  15. 根据权利要求14所述的业务服务系统,其中,还包括:维护模块,所述维护模块包括:数据同步单元;
    所述数据同步单元用于从存储服务器中获取映射数据,并将所述映 射数据存储于缓存内。
  16. 根据权利要求15所述的业务服务系统,其中,所述映射单元具体用于根据缓存内所存储的所述映射数据获取所述编码字段值所对应的编码解释值。
  17. 根据权利要求16所述的业务服务系统,其中,所述维护模块还包括:修改单元;
    所述修改单元用于响应于映射修改请求,对所述缓存和所述存储服务器内的所述映射数据进行同步修改。
  18. 根据权利要求15所述的业务服务系统,其中,所述数据同步单元包括:主处理单元和多个从属处理单元;
    所述主处理单元包括:
    获取子单元,用于获取所述存储服务器内所存储的映射数据所包含的对应关系数据总条数,一条对应关系数据包括一个编码字段值及其所对应的编码解释值;
    生成子单元,用于根据所述对应关系数据总条数生成多个数据获取任务;
    分配子单元,用于将多个所述数据获取任务分别分配给多个从属处理单元;
    汇总子单元,用于接收各所述从属处理单元所返回的对应关系数据,并进行汇总,以得到所述映射数据;
    所述从属处理单元用于根据接收到的所述数据获取任务从所述存储服务器中获取与所述数据获取任务相对应的对应关系数据,并将获取到的对应关系数据反馈给所述主处理单元。
  19. 根据权利要求18所述的业务服务系统,其中,所述生成子单元具体用于:根据所述对应关系数据总条数q和预先设置的单个数据获取任务所对应的对应关系数据条数p,计算出待生成的数据获取任务的数量n,
    Figure PCTCN2022085291-appb-100002
    表示对q与p的商值向上取整;以及,确定各数据获取任务在所述映射数据所对应的对应关系数据,并生成各所述数据获取任务,其中不同所示数据获取任务所对应的对应关系数据均不同。
  20. 根据权利要求18所述的业务服务系统,其中,所述分配子单元具体用于:
    确定可使用的从属处理单元的数量以及各所述从属处理单元的节点地址;
    确定各所述数据获取任务所对应的分配编号,其中第i个数据获取任务所对应的分配编号S_i=Hash(M_i)%j,M_i表示第i个数据获取任务所对应的任务编号,j表示可使用的从属处理单元的数量,Hash(M_i)表示对第i个数据获取任务所对应的任务编号M_i作哈希运算,%表示求余运算,1≤i≤n;
    根据预先获取的编号-地址对应关系数据,确定各所述数据获取任务所对应的节点地址,所述编号-地址对应关系数据包括不同所述分配编号及其对应的节点地址;
    以及,根据各所述数据获取任务所对应的节点地址,将各所述数据获取任务发送至对应的所述从属处理单元。
  21. 根据权利要求13所述的业务服务系统,其中,所述自定义序列化器还包括:
    序列化单元,用于将包含有所述编码解释值的实体类对象进行序列化处理,得到序列化数据;
    发送单元,用于将所述序列化数据反馈给业务请求端。
  22. 根据权利要求12至21中任一所述的业务服务系统,其中,所述实体类对象中所包含的预设业务编码字段配置有自定义序列化注解,所述自定义序列化注解指定所述自定义序列化器;
    所述自定义序列化注解为@JsonSerialize注解;
    所述自定义序列化器为自定义jackson序列化器。
  23. 根据权利要求12至22中任一所述的业务服务系统,其中,所述后台服务模块还配置有业务数据新增接口,所述业务数据新增接口用于响应于业务数据新增请求将业务数据新增请求中所包含的业务数据添加至业务数据库中。
PCT/CN2022/085291 2022-04-06 2022-04-06 业务编码解释织入方法、业务服务系统和存储介质 WO2023193135A1 (zh)

Priority Applications (2)

Application Number Priority Date Filing Date Title
CN202280000697.5A CN117203609A (zh) 2022-04-06 2022-04-06 业务编码解释织入方法、业务服务系统和存储介质
PCT/CN2022/085291 WO2023193135A1 (zh) 2022-04-06 2022-04-06 业务编码解释织入方法、业务服务系统和存储介质

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
PCT/CN2022/085291 WO2023193135A1 (zh) 2022-04-06 2022-04-06 业务编码解释织入方法、业务服务系统和存储介质

Publications (1)

Publication Number Publication Date
WO2023193135A1 true WO2023193135A1 (zh) 2023-10-12

Family

ID=88243703

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2022/085291 WO2023193135A1 (zh) 2022-04-06 2022-04-06 业务编码解释织入方法、业务服务系统和存储介质

Country Status (2)

Country Link
CN (1) CN117203609A (zh)
WO (1) WO2023193135A1 (zh)

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20050108627A1 (en) * 2003-11-13 2005-05-19 International Business Machines Corporation Serialization and preservation of objects
US20090150367A1 (en) * 2007-11-30 2009-06-11 Microsoft Corporation Mapping and query translation between xml, objects, and relations
CN107741847A (zh) * 2017-10-11 2018-02-27 江苏千米网络科技股份有限公司 实现领域驱动模型的方法及装置
CN112817592A (zh) * 2021-01-26 2021-05-18 四川天翼网络服务有限公司 一种基于实体注解的自动代码生成方法
CN113918158A (zh) * 2021-09-16 2022-01-11 浪潮软件科技有限公司 字典自动序列化成业务值的方法、装置及计算机可读介质

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20050108627A1 (en) * 2003-11-13 2005-05-19 International Business Machines Corporation Serialization and preservation of objects
US20090150367A1 (en) * 2007-11-30 2009-06-11 Microsoft Corporation Mapping and query translation between xml, objects, and relations
CN107741847A (zh) * 2017-10-11 2018-02-27 江苏千米网络科技股份有限公司 实现领域驱动模型的方法及装置
CN112817592A (zh) * 2021-01-26 2021-05-18 四川天翼网络服务有限公司 一种基于实体注解的自动代码生成方法
CN113918158A (zh) * 2021-09-16 2022-01-11 浪潮软件科技有限公司 字典自动序列化成业务值的方法、装置及计算机可读介质

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
ANONYMOUS: "Use of JsonSerialize annotations", CSDN BLOG, 29 October 2021 (2021-10-29), XP093097312, Retrieved from the Internet <URL:https://blog.csdn.net/qq_30434271/article/details/121029399> [retrieved on 20231102] *

Also Published As

Publication number Publication date
CN117203609A (zh) 2023-12-08

Similar Documents

Publication Publication Date Title
US11632441B2 (en) Methods, systems, and devices for electronic note identifier allocation and electronic note generation
WO2019149019A1 (zh) 数据交互方法、装置、计算机设备和存储介质
CN107454203A (zh) 在分布式系统中生成唯一id的方法
CN112860695B (zh) 监控数据查询方法、装置、设备、存储介质及程序产品
CN110110006A (zh) 数据管理方法及相关产品
CN110602158A (zh) 全局唯一id生成系统与方法、id生成器与存储介质
CN112506486A (zh) 搜索系统建立方法、装置、电子设备及可读存储介质
WO2009023585A2 (en) Dynamically converting symbolic links
CN115470156A (zh) 基于rdma的内存使用方法、系统、电子设备和存储介质
CN109586970B (zh) 资源分配方法、装置及系统
EP3422186A1 (en) Method, device and system for preventing memory data loss
WO2021164560A1 (zh) 一种多核芯片及其调度方法
WO2023193135A1 (zh) 业务编码解释织入方法、业务服务系统和存储介质
CN109067649B (zh) 节点处理方法及装置、存储介质和电子设备
WO2017008654A1 (zh) 一种反序列化方法及装置
CN111858617A (zh) 用户查找方法和装置、计算机可读存储介质、电子设备
US11758017B2 (en) Data acquisition method, service provider, service consumer and network functional entity
CN115904740A (zh) 一种gpu资源调用方法及系统
CN115964436A (zh) 一种数据库集群管理的方法和装置
CN115629909A (zh) 业务数据处理的方法、装置、电子设备和存储介质
CN113051244B (zh) 数据访问方法和装置、数据获取方法和装置
CN114567571A (zh) 性能测试方法、装置、电子设备和计算机可读存储介质
CN114238264A (zh) 数据处理方法、装置、计算机设备和存储介质
US10402391B2 (en) Processing method, device and system for data of distributed storage system
CN113051091A (zh) 一种进程级缓存数据同步方法和装置

Legal Events

Date Code Title Description
WWE Wipo information: entry into national phase

Ref document number: 202280000697.5

Country of ref document: CN

121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 22936084

Country of ref document: EP

Kind code of ref document: A1