Business information processing system and method
Patent Information
- Application Number
- CN202310012782.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-01-05
- Publication Date
- 2025-12-12
- Estimated Expiration
- 2043-01-05
Smart Images

Figure CN116048481B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present specification relates to the technical field of data storage, and in particular, to a business information processing system. The present specification also relates to a business information processing method, a computing device, and a computer-readable storage medium. BACKGROUND
[0002] With the rapid development of computer technology and Internet technology, the demand for information storage and management is also increasing. Information is an important asset for every enterprise, and there are many information to be stored in business. Business information in the program is generally organized in the form of objects or structures, and each such organization unit becomes a business record. In order to improve the access speed of business records, a plurality of idle records for business information are generally established in the system. The module that organizes and manages these business records is called a memory record module, so that the business module can access business records at any time and improve storage efficiency.
[0003] In the prior art, how the data members included in the business record are organized can only be known by the defined business module, and the memory record module and other access modules cannot know. In order to access the business record in the memory record module, it can only be based on the business module using the memory record module to achieve. The memory record module is highly coupled with the business module. When each business module wants to access the business record in the memory record module, it needs to separately develop the corresponding access logic, which leads to repeated development work, and the business module can only access the business record stored in the memory record by itself, which has poor flexibility and reusability. SUMMARY
[0004] Therefore, the embodiments of the present specification provide a business information processing system. The present specification also relates to a business information processing method, a computing device, and a computer-readable storage medium to solve the technical defects in the prior art.
[0005] According to a first aspect of the embodiments of the present specification, a business information processing system is provided. The system includes a business module, a memory record module, and an analysis record module.
[0006] The business module is configured to define a first record structure attribute of a business record, and generate a storage information compilation file according to a set coding rule. The first record structure attribute includes a record identifier of the business record and structure information of the business record.
[0007] The parsing record module is configured to parse the storage information compiling file according to the set decoding rule, obtain the first record structure attribute of the service record, and generate storage description information of the service record according to the first record structure attribute, where the storage description information is used for other modules to access the record content of the service record stored in the memory record module.
[0008] According to a second aspect of the embodiments of the present specification, a service information processing method is provided, applied to a parsing record module, and the method comprises:
[0009] According to the set decoding rule, the storage information compiling file is parsed to obtain the first record structure attribute of the service record, where the storage information compiling file defines the first record structure attribute of the service record for a service module and is generated according to the set encoding rule, and the first record structure attribute comprises a record identifier of the service record and structure information of the service record;
[0010] According to the first record structure attribute, the storage description information of the service record is generated, where the storage description information of the service record is used for other modules to access the record content of the service record stored in the memory record module.
[0011] According to a third aspect of the embodiments of the present specification, a computing device is provided, comprising:
[0012] a memory and a processor;
[0013] The memory is used to store computer executable instructions, and the processor is used to execute the computer executable instructions to realize the operation steps of the service information processing method described above.
[0014] According to a fourth aspect of the embodiments of the present specification, a computer readable storage medium is provided, which stores computer executable instructions, and the instructions are executed by the processor to realize the operation steps of the service information processing method described above.
[0015] The service information processing system provided by the embodiments of the present specification comprises a service module, a memory record module and a parsing record module; the service module is configured to define the first record structure attribute of the service record, and generate the storage information compiling file according to the set encoding rule, where the first record structure attribute comprises a record identifier of the service record and structure information of the service record; the parsing record module is configured to parse the storage information compiling file according to the set decoding rule, obtain the first record structure attribute of the service record, and generate the storage description information of the service record according to the first record structure attribute, where the storage description information is used for other modules to access the record content of the service record stored in the memory record module.
[0016] In this case, a parsing record module is introduced in the business information processing system, the parsing record module can generate storage description information of the business record based on the first record structure attribute of the business record, the storage description information can indicate the record identifier of the business record and the structure information of the business record, only through the parsing record module, the record content of the corresponding business record in the memory record module can be correctly and completely accessed, each data member in the business record can be correctly parsed, the memory record module is decoupled from the business module, the same access logic does not need to be repeatedly developed in each module needing to access the memory record module, the repeated development work is avoided, the business record is used as needed, the storage and access efficiency is improved; and other modules can access the record content of the corresponding business record in the memory record module through the storage description information recorded in the parsing record module, one module can access the record content of the business record stored in the memory record module by other modules, the flexibility and reusability are improved. BRIEF DESCRIPTION OF DRAWINGS
[0017] Figure 1 is a processing process schematic diagram of a business information processing system provided by an embodiment of the present specification;
[0018] Figure 2 is a structural block diagram of a business information processing system provided by an embodiment of the present specification;
[0019] Figure 3a is a processing process schematic diagram of a business information provided by an embodiment of the present specification;
[0020] Figure 3b is a writing process schematic diagram of a business record provided by an embodiment of the present specification;
[0021] Figure 3c is a compilation process schematic diagram provided by an embodiment of the present specification;
[0022] Figure 3d is an access process schematic diagram of a business record provided by an embodiment of the present specification;
[0023] Figure 3e is a processing process schematic diagram of another business information processing system provided by an embodiment of the present specification;
[0024] Figure 4 is a flow chart of a business information processing method provided by an embodiment of the present specification;
[0025] Figure 5 is a flow chart of another business information processing method provided by an embodiment of the present specification;
[0026] Figure 6is a structural schematic diagram of a record module provided by an embodiment of the present specification.
[0027] Figure 7 is a structural block diagram of a computing device provided by an embodiment of the present specification. DETAILED DESCRIPTION
[0028] In the following description, numerous specific details are set forth in order to provide a thorough understanding of the present specification. However, the present specification can be practiced without the specific details, other than in the examples described herein, and it is understood that the scope of the present specification is not limited to the details below.
[0029] The terminology used in one or more embodiments of the present specification is for the purpose of describing particular embodiments only and is not intended to be limiting of one or more embodiments of the present specification. As used in one or more embodiments of the present specification and the accompanying claims, the singular forms "a," "an," and "the" are intended to include the plural forms as well, unless the context clearly indicates otherwise. It will be further understood that the terms "comprises" and / or "comprising," when used in one or more embodiments of the present specification, specify the presence of stated features, integers, steps, operations, elements, and / or components, but do not preclude the presence or addition of one or more other features, integers, steps, operations, elements, components, and / or groups thereof.
[0030] It will be understood that, although the terms first, second, etc. can be employed in one or more embodiments of the present specification to describe various information, these terms are not intended to denote a particular order of the information. These terms are used only to distinguish one type of information from another. For example, without departing from the scope of one or more embodiments of the present specification, first can be termed second, and similarly, second can be termed first. Depending on the context, the word "if" as used herein can be interpreted to mean "when" or "in response to determining" or "in response to a determination."
[0031] First, the noun terms related to one or more embodiments of the present specification are explained.
[0032] Memory record module: There are many information to be stored in business, which are generally organized in the form of objects or structures in the program, and each such organization unit becomes a business record. In order to improve the access speed of business records, a plurality of idle records are generally established in advance for business information in the system, and these records are organized and managed to be called record module (or memory record module) in order to facilitate the business module to be taken at any time and improve the storage efficiency.
[0033] DWARF (Debugging With Attributed Record Formats): A debugging file format used by many compilers and debuggers to support source-level debugging. It provides the necessary debugging information, such as the file name and line number corresponding to a PC address, to facilitate source-level debugging. It contains enough information for the debugger to perform certain functions, such as displaying local variables in the current stack frame, attempting to modify variables, and jumping to the end of a function. It is extensible and can provide debugging information for multiple languages.
[0034] GCC (GNU Compiler Collection): A programming language translator under GUN, which includes C, C++, Objective-C, Fortran, Java, Ada, and Go language frontends, as well as libraries such as libstdc++ and libgcj. GCC was originally designed for the GNU operating system, a Unix-like operating system composed of free software.
[0035] GDB (GNU symbolic debugger): A debugging tool for UNIX and UNIX-like systems. This tool can start a program and make it stop at specified breakpoints (breakpoints can be conditional expressions). When the program is stopped, it can check what is happening in the program at that time and can also change the program to fix the impact of a bug and test other bugs.
[0036] PDB (Program Data Base): The basic data of a program, generated during compilation and linking. PDB files mainly store the basic information needed for debugging programs, including source file names, variable names, function names, FPO (frame pointer), corresponding line numbers, etc. Because it stores debugging information, PDB files are usually generated in Debug mode.
[0037] It should be noted that the business module can define a record basic attribute of the business record, which can include a record identifier (i.e., a business record name such as "business record A"), a single record size, a business record quantity, and the like, and the business module can apply for storage space of the business record to the memory record module based on the record basic attribute. In addition, the business module can also define a record structure attribute of the business record, which can include a record identifier, a member identifier, a member offset address, a data type, a type size, and the like, and the record structure attribute can be provided to the parsing record module to generate storage description information.
[0038] Figure 1 is a processing process schematic diagram of a business information processing system provided by an embodiment of the present specification, as shown in Figure 1 The record identifier is business record A, which includes data members such as int a, char b, float c, and the like, a, b, and c represent member identifiers of the data members, int, char, and float represent data types of the data members, int a represents that the a member occupies 4 bytes, char b represents that the b member occupies 1 byte, float c represents that the c member occupies 4 bytes, the offset address of the data member a is 0, the offset address of the data member b is 4, and the offset address of the data member c is 5.
[0039] The memory record module has a plurality of idle storage spaces (i.e., records) pre-established according to the record basic attribute provided by the business module, and each storage space corresponds to a storage address, such as record 1 corresponding to storage address 1, record 2 corresponding to storage address 2, and the like, and record n corresponding to storage address n. The memory record module saves the record basic attribute information and records the storage address of the storage space allocated for the business record.
[0040] When the business module stores a specific record under the business record A, the business module can first apply to the memory record module to write a record according to the record basic attribute, and the memory record module returns an idle storage address (such as the storage address 1 of the record 1), and the business module can store each data member under the business record A into the storage address returned by the memory record module. The memory record module marks the storage address returned to the business module to write specific record content as non-idle, and marks the returned storage address for the business record A.
[0041] It should be noted that in the above method, how the data members included in the business record are organized is known only by the defined business module, and the memory record module and other access modules cannot know. To access the business record in the memory record module, only the business module using the memory record module can be implemented, and the business module accesses the detailed information of each data member in the business record through the storage address fed back by the memory record module and the structure of each data member defined by itself.
[0042] Although many development tools have a way to view the memory record module, only the record content of the business record can be obtained from the memory record module, and how the record content of the business record is organized into different data members cannot be known, that is, how the data members included in the business record are organized is known only by the defined business module, and only the business module can correctly and completely access each data member included in the business record, and the memory record module is highly coupled with the business module.
[0043] Even GDB with powerful debugging functions is like this. When GDB acquires variable information of the data member during debugging, it is parsed by using the DWARF format, but for dynamically allocated memory, only the detailed content information of the memory can be obtained, and how the data members included in the business record are organized cannot be known, so that the record content cannot be correctly parsed into the correct data member, and the corresponding data type cannot be correctly parsed.
[0044] For example, a record of the business record A is "0X12 0X34 0X56 0X78 0X33 0X11 0X22 0X33 0X44", and the record content of the business record A is obtained from the memory record module by using the development tool, only the record content "0X12 0X34 0X56 0X78 0X33 0X11 0X22 0X33 0X44" can be obtained, but it is unknown which content can be organized into a data member, and the data type of the above record content cannot be known, only through the business module, it can be known that the data member a is an integer data, occupies 4 bytes, the data member b is a character data, occupies 1 byte, and the data member c is a single-precision floating-point data, occupies 4 bytes, that is, the record of the business record A should be parsed as "0X12 0X34 0X56 0X78 0X33 0X11 0X22 0X33 0X44", wherein "0X12 0X34 0X56 0X78" is the data member a, "0X33" is the data member b, and "0X11 0X22 0X33 0X44" is the data member c.
[0045] It should be noted that the service record in the memory record module is equivalent to a black box for the memory record module and other modules, and cannot be visualized, and all service modules using the memory record module need to write relevant access units by themselves, which is repetitive work.
[0046] Therefore, in the embodiments of the present specification, a general access system for service records in a memory record module is needed to solve the above problems. The system can introduce a parsing record module to store detailed organization information of each data member in the service record, decouple the memory record module and the service module, and enable any module to parse and access each data member included in any service record in the memory record module through the parsing record module, thereby ensuring the correctness and integrity of the data members in the service record.
[0047] In the present specification, a service information processing system is provided, and the present specification also relates to a service information processing system method, a computing device, and a computer-readable storage medium, which are described in detail one by one in the following embodiments.
[0048] Figure 2 A structural block diagram of a service information processing system provided according to an embodiment of the present specification is shown, and the service information processing system includes a service module 202, a memory record module 204, and a parsing record module 206.
[0049] The service module 202 is configured to define a first record structure attribute of a service record, and generate a storage information compilation file according to a set coding rule, wherein the first record structure attribute includes a record identifier of the service record and structure information of the service record.
[0050] The parsing record module 206 is configured to parse the storage information compilation file according to a set decoding rule, obtain the first record structure attribute of the service record, and generate storage description information of the service record according to the first record structure attribute, wherein the storage description information is used for other modules to access record content of the service record stored in the memory record module.
[0051] Specifically, the service record is an organization unit obtained in the form of an object or a structure body for to-be-stored service information. One organization unit is one service record, and one service record can include multiple data members, and each data member can occupy at least one byte.
[0052] It should be noted that when writing code, the business module can define the first record structure attribute of the business record and generate a storage information compilation file according to the set encoding rules. This first record structure attribute includes the record identifier and the structure information of the business record. This structure information can include member identifiers, member offset addresses, data types, type sizes, etc., where the type size indicates the number of bytes occupied by the data of that type. Therefore, the record parsing module can parse this storage information compilation file according to the set decoding rules to obtain the first record structure attribute of the business record. Based on the obtained first record structure attribute, it generates the storage description information of the business record. This storage description information can indicate the structure of each data member in the business record; that is, the storage description information can also include information such as record identifiers, member identifiers, member offset addresses, data types, and type sizes. Based on the above information, the record content of the business record can be correctly parsed.
[0053] Among them, the setting of decoding rules corresponds to the setting of encoding rules. That is, the parsing record module can use the same decoding method as the setting of encoding method to parse the storage information compilation file, thereby obtaining the first record structure attribute of the business record.
[0054] Example, Figure 3a This is a schematic diagram illustrating a business information processing procedure provided in one embodiment of this specification, such as... Figure 3a As shown, the parsing record module can parse the storage information compilation file according to the set decoding rules, obtain the first record structure attribute of the business record, and generate the storage description information of the business record based on the first record structure attribute. The storage description information includes record identifier, member field information of data members, etc. The member field information can be member identifier, member offset address, data type, type size, etc. Based on the above information, the structure of each data member in the business record can be indicated.
[0055] In this embodiment, a parsing record module is introduced into the business information processing system. This parsing record module can be accessed by any other module. The parsing record module records storage description information of multiple business records. This storage description information can indicate the structural information of each data member in the business record. Subsequent access modules can access the record content of the business records in the memory record module based on the parsing record module, and parse and display it according to the correct structure. The combination of the memory record module and the parsing record module can automatically complete the structural analysis of each data member in the business record and ensure the correctness and completeness when displaying (querying and modifying) each data member. The memory record module is decoupled from the business module.
[0056] In an optional implementation of the embodiment, the business module is further configured to define a first record basic attribute of the business record and transmit the first record basic attribute to the memory record module.
[0057] The memory record module is configured to allocate storage space for the business record based on the first record basic attribute and record a first storage address of the storage space corresponding to the business record.
[0058] It should be noted that the business module can define the first record basic attribute of the business record when writing the code, and the first record basic attribute can include record identification, single record size, record quantity and the like. There can be multiple records under one record identification, and the size and structure of the multiple records are the same, and only the specific data is different. Therefore, the business module can define the first record basic attribute of the business record and transmit the first record basic attribute to the memory record module to apply for storage space from the memory record module.
[0059] In actual application, the business module transmits the first record basic attribute to the memory record module, the memory record module stores the record identification, single record size and record quantity, and creates blank storage space corresponding to the record quantity, and the size of each storage space is determined by the single record size, so as to write specific record content by the subsequent business module. In addition, the memory record module can record the first storage address of the storage space corresponding to the business record after allocating the storage space for the business record based on the first record basic attribute, that is, record the correspondence between the business record and the storage address. The storage address refers to the address of the business record in the memory record module, and the storage address can be the storage space address in the memory record module and the sub-space number in the storage space.
[0060] As shown in FIG. 6, the business module transmits the record identification, single record size, record quantity and the like to the memory record module, and the memory record module stores the record identification, single record size, record quantity and the like, and creates blank storage space corresponding to the record quantity. The size of each storage space is determined by the single record size, so as to write specific record content by the subsequent business module. Figure 3a As shown in FIG. 6, the business module transmits the record identification, single record size, record quantity and the like to the memory record module, and the memory record module stores the record identification, single record size, record quantity and the like, and creates blank storage space corresponding to the record quantity. The size of each storage space is determined by the single record size, so as to write specific record content by the subsequent business module. Figure 3a As shown in FIG. 6, the business module transmits the record identification, single record size, record quantity and the like to the memory record module, and the memory record module stores the record identification, single record size, record quantity and the like, and creates blank storage space corresponding to the record quantity. The size of each storage space is determined by the single record size, so as to write specific record content by the subsequent business module.
[0061] In an optional implementation of the embodiment, the business module 202 is further configured to:
[0062] The first record basic attribute is transmitted to the in-memory record module 204 by calling a transmission function, or a template class interface is created to transmit the first record basic attribute to the in-memory record module 204.
[0063] Specifically, a template refers to a mechanism for generating functions and classes according to parameter types, that is, a tool for implementing a code reuse mechanism. It can achieve type parameterization, define types as parameters, and thus achieve true code reusability. Templates can be divided into two categories. One is a function template. Using a function template, a set of functions that are based on the same code but handle different types or classes can be specified. The other is a template class. Template classes (class templates) can be used to create a family of classes that operate on a type.
[0064] In actual applications, the business module can pass information to the in-memory record module in two ways. One way is to call a transmission function. The record identification, single record size, and record quantity are passed to the in-memory record module as parameters of the transmission function. The other way is to create a template class interface. The record identification, single record size, and record quantity are passed to the in-memory record module through the template class interface. The in-memory record module can save the passed-in record identification, single record size, and record quantity as the first record basic attribute, and pre-allocate corresponding storage space (single record size * record quantity) based on the first record basic attribute.
[0065] It should be noted that when the template class interface is used, the record identification of the business record in the compilation output is wrapped by the template class name. This feature can be used to obtain the record identification (such as the record type name) in the subsequent record module and obtain the corresponding storage address from the in-memory record module based on the record identification. That is, the template class name is used as a keyword to search and extract the record identification and size. This is also a means of decoupling the in-memory record module and the business module. Subsequently, the storage description information can be constructed in the parsing record module, which is more efficient than constructing it when the business module is accessed.
[0066] In the embodiments of the present specification, the first record basic attribute can be passed from the business module to the in-memory record module in two ways, greatly improving the operation flexibility and better adapting to different application scenarios.
[0067] In an optional implementation of the embodiment, the first record basic attribute includes a record identification. The business module is further configured to:
[0068] In a case where a write instruction of a first record under a record identifier is received, a transmission function is invoked, a return value of the transmission function is obtained, and the return value is a target storage address fed back by the memory record module; or, in a case where a write instruction of a target record is received, a template class interface is invoked, and a target storage address fed back by the memory record module is obtained; wherein the target storage address is a storage address of any one of at least one storage space allocated by the memory record module for the record identifier;
[0069] The record content of the first record is written to the target storage address.
[0070] It should be noted that the business module first inputs a first record basic attribute to the memory record module, applies for a storage space to the memory record module, and the memory record module allocates a corresponding storage space based on the first record basic attribute after receiving the first record basic attribute. Then, when the business module needs to write a specific first record under the record identifier, the business module can apply for writing to the memory record module, at this time, the memory record module can return any one of a plurality of storage addresses prepared for the record identifier to the business module, and then the business module writes specific record content based on the target storage address returned by the memory record module.
[0071] In addition, the memory record module can also mark the target storage address returned to the business module for writing specific record content as non-idle, and mark the returned storage address for the business record A.
[0072] An example is provided in the embodiment of the present specification. Figure 3b is a write process schematic diagram of a business record provided by an embodiment of the present specification, as Figure 3b shown, n blank storage spaces are allocated in the memory record module for the business record A, the storage addresses are storage address 1-storage address n respectively, and "business record A-storage address 1 (first address)" is recorded. When the business module needs to write a specific business record under the business record A, the business module can obtain an idle storage address from the memory record module through the record identifier "business record A", and it is assumed that the obtained storage address is storage address 1, at this time, the business module can assign the storage address 1 according to the member type of each data member in the business record to write the record under the business record A to the storage address 1 of the memory record module, as Figure 3b shown, the record is "0x12 0x34 0x56 0x78 0x33……0x11 0x22 0x33 0x44".
[0073] In an optional implementation of the embodiment, the business module 202 is further configured to:
[0074] compile the code through a compilation command set by the compiler to generate a storage information compilation file; or,
[0075] generate the custom format, record the first record structure attribute according to the custom format, generate the storage information compilation file, and add the custom format at a set position of the storage information compilation file; or
[0076] Under a set operating system, output the first record structure attribute as a program database file by setting a debugging option, and take the program database file as the storage information compilation file.
[0077] It should be noted that the set encoding rule can be various, for example, the set encoding rule can be encoding by compiling the code by a compiler, custom format, or setting a debugging option to generate the storage information compilation file.
[0078] In the first possible implementation, the code can be compiled by a set compiling command of a compiler to generate the storage information compilation file. Taking a compiler as an example, GCC, a -g (set compiling command) option is added during GCC compiling, and the compiling output of the business module is an output file (such as.so,.a, an executable file, etc.), which is loaded by a main program. After the -g option is added, the output file will increase debugging information according to a DWARF protocol format, and the debugging information has structure information of each data member, such as member identification, member offset address, data type, type size, and the like. Subsequent analysis of the record module can parse the above information according to the DWARF protocol format.
[0079] It should be noted that during the code writing stage, the first record structure attribute of the business record can be defined in the code, and then the written code is compiled to generate a so file, that is, a business module execution program, and file description information corresponding to the so file can also be obtained. The obtained file description information can be mixed in the business module execution program according to other rules, that is, the business module execution program and the file description information can be combined into one file, or the business module execution program and the file description information can also be two independent files.
[0080] In the example, Figure 3c is a compiling process schematic diagram provided by an embodiment of the present specification, as shown in Figure 3cAs shown, assuming that the first record structure attribute defined for the business record TA (i.e., struct TA) is "struct TA: int a; char b; int c", the structure or class written in the code is as follows: struct TA {int a; char b; int c;}. When drawing, the left drawing can be used to represent the record. Compiling the code can generate an so file, i.e., a business module executable file (file 1), and also can obtain file description information (file 2) corresponding to the so file, such as: {record name: TA; first member attribute name a, type int, relative offset 0, type size 4, occupied space 4; second member attribute name b, type char, relative offset 4, type size 1, occupied space 1; first member attribute name c, type int, relative offset 5, type size 4, occupied space 4}. The above file 1 and file 2 can be combined into one file or two independent files.
[0081] In the second possible implementation, a custom format can be generated, the first record structure attribute is recorded according to the custom format to generate a storage information compilation file, and the custom format is added at a set position of the storage information compilation file, so that the subsequent record module parses the storage information compilation file according to the custom format.
[0082] In actual application, the business module can customize the format, i.e., the business module can customize the class or structure information in the header file, save the record identifier, member identifier, member offset address, data type, type size and the like of the business record according to the custom format, and append to the output file in the agreed format (such as json) or form another parsing file.
[0083] In the third possible implementation, under a set operating system, the first record structure attribute can be output as a program database file by setting a debugging option, and the program database file is used as the storage information compilation file. It should be noted that under the set operating system, an independent.pdb file (i.e., a program database file) is compiled and output after the debugging option is specified, the program database file has debugging information, and the subsequent record module can parse the storage information compilation file according to the PDB file protocol format to obtain the corresponding record identifier, member identifier, member offset address, data type, type size and the like.
[0084] In the embodiments of the present specification, the business module can code the defined first record structure attribute (such as the record identifier, member identifier, member offset address, data type, type size and the like) into a storage information compilation file in three different ways, and the subsequent record module can parse the storage information compilation file to obtain the corresponding information to construct storage description information. The way is flexible and variable, and is suitable for different application scenarios.
[0085] In an optional implementation of the embodiment, the record parsing module 206 is further configured to:
[0086] parse the storage information compilation file based on a debugging information format to obtain the first record structure attribute of the service record; or
[0087] read a custom format from a set position of the storage information compilation file, and parse the storage information compilation file based on the custom format to obtain the first record structure attribute of the service record; or
[0088] parse the storage information compilation file based on a protocol format of a program database file to obtain the first record structure attribute of the service record.
[0089] It should be noted that the service module can encode the defined first record structure attribute to obtain the storage information compilation file by using three different encoding manners, and correspondingly, the record parsing module can parse the storage information compilation file by using the corresponding three parsing manners.
[0090] In a first possible implementation, the record parsing module can parse the storage information compilation file based on a debugging information format to obtain the first record structure attribute of the service record. It should be noted that the GCC compiler provides the storage information compilation file in the form of an output file (such as.so,.a, an executable file, etc.), and the record parsing module can parse the output text content according to the DWARF protocol format, retrieve a template class name, extract a record identifier of the service record, obtain the record identifier, a member identifier, a member offset address, a data type, a type size, and the like of the service record according to the DWARF protocol format, and construct storage description information based on the above information.
[0091] For example, the template class can be Mmm<struct aaa, 10, 100>, which indicates that the template class name is Mmm, the record identifier is aaa, the record size is 10, and the record quantity is 100.
[0092] In a second possible implementation, the record parsing module can read a custom format from a set position of the storage information compilation file, and then parse the storage information compilation file based on the custom format to obtain the first record structure attribute of the service record.
[0093] It should be noted that the record parsing module can read the custom format from the set position (such as the end) of the storage information compilation file according to an agreement, parse based on the custom format of the service module, obtain the record identifier, the member identifier, the member offset address, the data type, the type size, and the like of the service record, and construct the storage description information.
[0094] In a third possible implementation, the parsing record module can parse the storage information compilation file based on a protocol format of the program database file to obtain the first record structure attribute of the service record.
[0095] It should be noted that the parsing record module can parse the storage information compilation file according to the PDB file protocol format to obtain the record identifier, the member identifier, the member offset address, the data type, the type size and the like of the corresponding service record, and construct the storage description information.
[0096] In the embodiments of the present specification, the service module can generate the storage information compilation file through three different ways, and correspondingly, the parsing record module can parse the storage information compilation file through the corresponding way to obtain the corresponding information to construct the storage description information. The encoding and decoding way is flexible and changeable, and is suitable for different application scenarios.
[0097] In an optional implementation of the present embodiment, the service record includes at least one data member, each data member occupies at least one byte, the first record structure attribute includes the record identifier, the member identifier, the member offset address, the data type and the type size, and the member offset address is determined based on the number of occupied bytes; correspondingly, the storage description information also includes the record identifier, the member identifier, the member offset address, the data type and the type size.
[0098] It should be noted that the service record includes at least one data member, each data member occupies at least one byte. When the service record defines the first record structure attribute, the offset address of each data member in the service record can be defined based on the number of occupied bytes. The parsing record module can obtain the offset address of each data member based on the first record structure, and record the offset address in the storage description information. Alternatively, when the service record defines the first record structure attribute, only the number of bytes occupied by each data member can be defined. The parsing record module can determine the offset address of each data member based on the number of bytes occupied by each data member, and record the offset address in the storage description information. In this way, the type, size, number of occupied bytes and offset address of each data member in the service record can be obtained based on the storage description information, so that each data member included in the service record can be correctly parsed based on the storage description information.
[0099] For example, assuming that the business record A includes data members of int a, char b, float c, etc., a, b, and c represent the identities of the data members, int, char, and float represent the types of the data members, int a represents that the member a occupies 4 bytes, char b represents that the member b occupies 1 byte, and float c represents that the member c occupies 1 byte. At this time, it can be determined that the offset address of the data member a is 0, the offset address of the data member b is 4, and the offset address of the data member c is 5. Based on the offset addresses of the respective data members, in combination with other structural information of the business record A (including the record identity, the member identity, the data type, and the type size, etc.), the storage description information of the business record A can be generated.
[0100] In an optional implementation form of the embodiment, the business information processing system further includes an access module;
[0101] The access module is configured to receive a record query instruction for a target record, and transmit the target record identity carried in the record query instruction to the record parsing module 206.
[0102] The record parsing module 206 is configured to find the target storage description information corresponding to the target record identity, acquire the structural information of the target record identity from the target storage description information, acquire the second storage address corresponding to the target record identity from the in-memory record module according to the target record identity, acquire the record content of the target record from the in-memory record module according to the second storage address, and parse the record content to obtain the respective data members included according to the structural information, and return the respective data members obtained by the parsing to the access module.
[0103] Specifically, when the record parsing module acquires the second storage address of the target record identity from the in-memory record module according to the target record identity, the record parsing module can transmit the target record identity to the in-memory record module, the in-memory record module queries the non-idle storage address list (i.e., the storage address list in which specific record content is written) corresponding to the target record identity, returns the non-idle storage address list as the second storage address to the record parsing module, the record parsing module acquires the record content of the target record from the in-memory record module based on the second storage address, correctly parses the respective data members included based on the structural information, and returns the respective data members to the access module.
[0104] In addition, after the record parsing module finds the target storage description information corresponding to the record identity, the record parsing module can also return the target storage description information to the access module, so that the access module can perform access operations such as viewing, editing, and modifying on the target record based on the target storage description information.
[0105] In actual application, Figure 3dis a service record access process schematic diagram provided by an embodiment of the present specification, as shown in Figure 3d As the access module does not know which storage description information of service records is stored in the parsing record module, the access module can first inquire the parsing record module to determine which storage description information of service records is stored in the parsing record module, that is, the access module sends an inquiry instruction to the parsing record module, and the parsing record module returns the searchable record identifier of the storage description information recorded by itself, which is similar to a directory.
[0106] After the access module learns the searchable record identifier, it specifies a target record identifier to be queried based on its own needs, and transmits the target record identifier to the parsing record module. The parsing record module finds the target storage description information (including the target record identifier and member field information) corresponding to the target record identifier, and obtains the structure information of the target record identifier, i.e., the member field information, from the target storage description information. The member field information includes the structure information of each data member, such as the structure information of members a, b, and c. The structure information of each member includes member identifier, member offset address, data type, type size, and the like.
[0107] After the parsing record module obtains the target storage description information, it can also feed back the target storage description information to the access module, so that the access module can obtain the target record identifier and the corresponding structure information, such as "TA: int a, char b, int c; type size is 4, 1, and 4, respectively".
[0108] The parsing record module can obtain the corresponding second storage address from the memory record module based on the target record identifier, and obtain the record content of the target record from the memory record module based on the second storage address. According to the structure information of each data member, the parsing record module parses the record content of the target record to obtain each data member included, and returns each data member obtained by parsing to the access module. For example, the parsed each data member is a (0x12 0x34 0x56 0x78), b (0x33), and c (0x11 0x22 0x33 0x44).
[0109] It should be noted that the analysis record module stores storage description information corresponding to different service records, and the storage description information can indicate the structure of each data member in the service record. Only by using the analysis record module, the specific record content of the corresponding service record in the memory record module can be correctly and completely accessed, each data member in the record content can be correctly parsed, the memory record module is decoupled from the service module, and the same access logic does not need to be repeatedly developed in each module that needs to access the memory record module, thereby avoiding repeated development work, improving the storage and access efficiency, and enabling the service record to be used at any time. The storage and access efficiency is improved; and other modules can access the record content of the corresponding service record in the memory record module by using the storage description information recorded in the analysis record module, that is, one module can access the record content of the service record stored in the memory record module by other modules, thereby improving flexibility and reusability.
[0110] In an optional embodiment of the present embodiment, the access module is further configured to receive a modification instruction for the target record, modify the record content of the target record based on the modification instruction, obtain updated record content, and return the updated record content to the analysis record module.
[0111] The analysis record module is further configured to compare the record content and the updated record content, determine the modification address and the modification content of the target record, and modify the record content of the target record stored in the memory record module based on the modification address and the modification content.
[0112] It should be noted that one record identifier can correspond to multiple service records, the attributes and structures of different service records under the same record identifier are the same, and only the specific record content is different, that is, the record content of each service record corresponding to one record identifier can form an N-row and M-column data table, N represents the number of service records under the record identifier, and M represents the number of data members included. After the analysis record module analyzes the target record based on the storage description information, an N-row and M-column data table corresponding to the target record can be obtained. The analysis record module can return the data table to the access module, the access module can initiate a modification instruction to modify a certain data member in the data table, obtain updated record content, and return the updated record content to the analysis record module. The analysis record module can compare the record content parsed by itself and the updated record content returned by the access module to determine the modification address and the modification content of the target record, that is, the modification address and the modification content of the first service record under the record identifier, and then the analysis record module directly modifies the record content of the record in the memory record module based on the modification address and the modification content after the verification is passed.
[0113] For example, assuming that the target record is a business record A, the data members of the business record A are int a, char b, and float c, and when the business record A is applied for storage space, the memory record module allocates 100 free storage spaces for the business record A, but only 80 storage spaces of the 100 free storage spaces are written with specific record content, that is, at this time, the parsing record module can obtain storage address 1-storage address 80 of the business record A from the memory record module based on the "business record A", and obtain the record content of 80 records under the business record A from the memory record module based on the storage address 1-storage address 80, and then parse the 80 record contents based on the structure information recorded in the storage description information of the business record A to obtain the respective data members included in the 80 record contents, and return the respective data members to the access module.
[0114] Assuming that the access module modifies the record content shown in Table 1 to the updated record content shown in Table 2, and returns the updated record content to the parsing record module, the parsing record module can compare Table 1 and Table 2 to determine that the modification address is storage address 3 and the modification content is "0X13 0X36 0X66 0X48 0X98 0X51 0X62 0X34 0X51", and the parsing record module can directly modify the record content at storage address 3 in the memory record module based on the modification address and the modification content.
[0115] Table 1 record content table
[0116] int a char b float c 0X12 0X34 0X56 0X78 0X33 0X11 0X22 0X33 0X44 0X22 0X44 0X36 0X58 0X21 0X41 0X23 0X35 0X45 0X13 0X36 0X66 0X48 0X53 0X51 0X62 0X34 0X51 …… …… …… 0X17 0X74 0X52 0X68 0X37 0X71 0X72 0X67 0X38
[0117] Table 2 updated record content table
[0118] int a char b float c 0X12 0X34 0X56 0X78 0X33 0X11 0X22 0X33 0X44 0X22 0X44 0X36 0X58 0X21 0X41 0X23 0X35 0X45 0X13 0X36 0X66 0X48 0X98 0X51 0X62 0X34 0X51 …… …… …… 0X17 0X74 0X52 0X68 0X37 0X71 0X72 0X67 0X38
[0119] In addition, when the access module modifies the record content under the target record identifier in the memory record module, in addition to returning the entire record content under the target record identifier to the parsing record module as described above, the access module can also return only the modification address and the modification content of the modified record content and the original content corresponding to the modification content to the parsing record module. The parsing record module can find the record content in the entire record content under the target record identifier based on the modification address, and compare the record content with the original record content transmitted by the access module, if they are consistent, it means that the record content has not been modified by other modules in the middle of the way, and the parsing record module can directly modify the record content at the modification address in the memory record module based on the modification address and the modification content; if they are not consistent, it means that the record content stored in the access module is not the latest record content, in order to avoid modification conflicts, the parsing record module can return confirmation information to make the access module reacquire the latest record content and then modify it.
[0120] That is, the parsing record module only modifies the record content when the found record content is consistent with the original record content transmitted by the access module. The parsing record module must obtain the current latest record content before modifying it. That is, the second module can modify the record content on the basis of the modification of the first module. The two modules are not allowed to modify simultaneously. Only one module is allowed to modify the record content in the memory record module each time, thereby avoiding the modification conflict between different modules.
[0121] It should be noted that the access module can modify the record content of the target record in addition to displaying the record content included in the target record. The modification of the record content of the business record in the memory record module can be achieved only by the parsing record module. The memory record module is completely decoupled from the business module. The same access logic does not need to be repeatedly developed in each module that needs to access the memory record module, thereby avoiding the repeated development work. The business record is used as needed, and the storage and access efficiency is improved.
[0122] As an example, Figure 3e is a schematic diagram of a processing process of another business information processing system provided by an embodiment of the present specification, as Figure 3e shown, the business record A includes data members such as int a, char b, float c, and the like. a, b, and c represent the identities of the data members. int, char, and float represent the types of the data members. int a represents that the a member occupies 4 bytes. char b represents that the b member occupies 1 byte. float c represents that the c member occupies 4 bytes.
[0123] The memory record module can pre-establish a plurality of idle storage spaces (i.e., records) based on the application of the business module. Each storage space corresponds to a storage address. For example, record 1 corresponds to storage address 1, record 2 corresponds to storage address 2, and record n corresponds to storage address n. The memory record module stores the business record A and the corresponding storage address.
[0124] When the business module needs to store a specific business record of the business record A, the business module can apply to the memory record module. The content record module returns an arbitrary storage address from the storage addresses 1-n and records the returned storage address as non-idle. The business module writes the record content of the business record based on the returned storage address.
[0125] The parsing record module can parse the storage information compiling file (the business module defines the first record structure attribute in advance and generates according to the set coding rule), obtain the first record structure attribute of the business record, and then generate the storage description information of the business record according to the first record structure attribute.
[0126] The storage description information includes record identification, member field information of data members, and the like. The member field information can include member identification, member offset address, data type, type size, and the like. Based on the above information, the structure of the data members in the business record can be indicated. The subsequent access module can access the record content of the business record in the memory record module based on the parsing record module, parse and display each data member included in the record content according to the correct structure, and automatically complete the structure analysis of each data member in the business record and ensure the correctness and integrity when each data member is displayed (queried and modified).
[0127] It should be noted that as long as the storage description information of a certain business record is stored in the parsing record module, the access module can access the record content of the business record in combination with the parsing record module and the memory record module. That is, the access module can access the record content of the business record stored in the memory record by any module. Thus, one module can access the record content of the business record stored in the memory record by other modules, improving flexibility and reusability.
[0128] In actual application, if the parsing record module is not introduced into the business information processing system, the structure information of the data members in the business record is defined by the business module itself. Therefore, the display (query and modification) of the record content can only be completed by the business module. If the access is completed by the memory record module, the memory record module needs to know the structure information defined by the business module, resulting in high dependence and coupling between the memory record module and the business module.
[0129] The business information processing system provided by the embodiment of the present specification introduces an analysis record module, which can generate storage description information of a business record based on a first record structure attribute of the business record. The storage description information can indicate a record identifier of the business record and structure information of each data member. Only by using the analysis record module, the record content of the corresponding business record in the memory record module can be correctly and completely accessed, and each data member in the business record can be correctly analyzed. The memory record module is decoupled from the business module, and the same access logic does not need to be repeatedly developed in each module that needs to access the memory record module, thereby avoiding repeated development work. The business record can be used as needed, thereby improving storage and access efficiency. In addition, other modules can access the record content of the corresponding business record in the memory record module by using the storage description information recorded in the analysis record module. One module can access the record content of the business record stored in the memory record by another module, thereby improving flexibility and reusability.
[0130] Figure 4 A flowchart of a business information processing method according to an embodiment of the present specification is shown in FIG. 4. As shown in FIG. 4, the business information processing method includes the following steps: Figure 4
[0131] Step 402: The business module defines a first record structure attribute of a business record, and generates a storage information compilation file according to a set coding rule, wherein the first record structure attribute includes a record identifier of the business record and structure information of the business record.
[0132] In an optional embodiment of the present embodiment, the business module defines a first record structure attribute of a business record, and generates a storage information compilation file according to a set coding rule, including:
[0133] The code is compiled by a set compilation command of a compiler to generate the storage information compilation file; or,
[0134] A custom format is generated, the first record structure attribute is recorded according to the custom format, the storage information compilation file is generated, and the custom format is added at a set position of the storage information compilation file; or,
[0135] Under a set operating system, the first record structure attribute is output as a program database file by setting a debugging option, and the program database file is used as the storage information compilation file.
[0136] Step 404: The business module defines a first record basis attribute of a business record, and transmits the first record basis attribute to the memory record module.
[0137] In an optional embodiment of the present embodiment, the first record basis attribute is transmitted to the memory record module, including:
[0138] The transmission function is called to transmit the first record base attribute to the memory record module; or, a template class interface is created, and the first record base attribute is transmitted to the memory record module through the template class interface.
[0139] Step 406: The memory record module allocates storage space for the service record based on the first record base attribute, and records the first storage address of the storage space corresponding to the service record.
[0140] In an optional embodiment of the present embodiment, the first record base attribute includes a record identifier; after the memory record module allocates storage space for the service record based on the first record base attribute, the method further includes:
[0141] In a case where the service module receives a write instruction of the first record under the record identifier, a transmission function is called to obtain a return value of the transmission function, and the return value is a target storage address fed back by the memory record module; or, in a case where a write instruction of a target record is received, a template class interface is called to obtain a target storage address fed back by the memory record module; wherein, the target storage address is a storage address of any storage space in at least one storage space allocated by the memory record module for the record identifier;
[0142] The service module writes record content of the first record to the target storage address.
[0143] Step 408: The parsing record module parses the storage information compilation file according to a set decoding rule to obtain the first record structure attribute of the service record.
[0144] In an optional embodiment of the present embodiment, the parsing record module parses the storage information compilation file according to a set decoding rule to obtain the first record structure attribute of the service record, including:
[0145] The storage information compilation file is parsed based on a debugging information format to obtain the first record structure attribute of the service record; or.
[0146] A custom format is read from a set position of the storage information compilation file, and the storage information compilation file is parsed based on the custom format to obtain the first record structure attribute of the service record; or,
[0147] The storage information compilation file is parsed based on a protocol format of a program database file to obtain the first record structure attribute of the service record.
[0148] Step 410: The parsing record module generates storage description information of the service record according to the first record structure attribute, and the storage description information is used for other modules to access record content of the service record stored in the memory record module.
[0149] The business record includes at least one data member, each data member occupies at least one byte, the first record structure attribute includes record identification, member identification, member offset address, data type and type size, and the member offset address is determined based on the number of occupied bytes. Correspondingly, the storage description information also includes record identification, member identification, member offset address, data type and type size. The storage description information of the business record is used for other modules to access the record content of the business record stored in the memory record module.
[0150] Step 412: When the access module receives the record query instruction for the target record, the target record identification carried in the record query instruction is transmitted to the parsing record module.
[0151] Step 414: The parsing record module finds the target storage description information corresponding to the target record identification, and obtains the structure information of the target record identification from the target storage description information.
[0152] Step 416: The parsing record module obtains the second storage address corresponding to the target record from the memory record module according to the target record identification, and obtains the record content of the target record from the memory record module according to the second storage address. Then, according to the structure information, the record content is parsed to obtain each data member included, and each data member obtained by parsing is returned to the access module.
[0153] Step 418: The access module receives the modification instruction for the target record, modifies the record content of the target record based on the modification instruction, obtains the updated record content, and returns the updated record content to the parsing record module.
[0154] Step 420: The parsing record module compares the record content and the updated record content, determines the modification address and the modification content of the target record, and modifies the record content of the target record stored in the memory record module based on the modification address and the modification content.
[0155] The business information processing method provided by the embodiment of the present specification introduces an analysis record module in the business information processing system. The analysis record module can generate storage description information of a business record based on a first record structure attribute of the business record. The storage description information can indicate a record identifier of the business record and structure information of each data member. The record content of the corresponding business record in the memory record module can be correctly and completely accessed by only the analysis record module. Each data member in the business record can be correctly analyzed. The memory record module is decoupled from the business module. The same access logic does not need to be repeatedly developed in each module that needs to access the memory record module. The repeated development work is avoided. The business record is used as needed, and the storage and access efficiency is improved. The storage description information recorded in the analysis record module can be accessed by other modules to access the record content of the corresponding business record in the memory record module. One module can access the record content of the business record stored in the memory record by other modules. The flexibility and reusability are improved.
[0156] Figure 5 A flowchart of another business information processing method provided by an embodiment of the present specification is shown. The method is applied to the analysis record module in the above business information processing system. As shown in Figure 5 The business information processing method includes the following steps.
[0157] Step 502: Analyzing the storage information compilation file according to a set decoding rule to obtain a first record structure attribute of a business record.
[0158] The storage information compilation file is used to define the first record structure attribute of the business record for the business module and is generated according to a set encoding rule. The first record structure attribute includes a record identifier of the business record and structure information of the business record.
[0159] In an optional embodiment of the present embodiment, analyzing the storage information compilation file according to a set decoding rule to obtain a first record structure attribute of a business record includes:
[0160] Analyzing the storage information compilation file based on a debugging information format to obtain a first record structure attribute of a business record; or.
[0161] Reading a custom format from a set position of the storage information compilation file, analyzing the storage information compilation file based on the custom format to obtain a first record structure attribute of a business record; or,
[0162] Analyzing the storage information compilation file based on a protocol format of a program database file to obtain a first record structure attribute of a business record.
[0163] Step 504: generating storage description information of the service record according to the first record structure attribute, wherein the storage description information of the service record is used for other modules to access the record content of the service record stored in the memory record module.
[0164] In an optional implementation of the embodiment, the service record includes at least one data member, each data member occupies at least one byte, the first record structure attribute includes record identification, member identification, member offset address, data type and type size, and the member offset address is determined based on the number of occupied bytes; correspondingly, the storage description information also includes record identification, member identification, member offset address, data type and type size.
[0165] The service information processing method provided in the embodiment introduces a parsing record module in the service information processing system, the parsing record module can generate storage description information of the service record based on the first record structure attribute of the service record, the storage description information can indicate the record identification of the service record and the structure information of each data member, and only the parsing record module is needed to correctly and completely access the record content of the corresponding service record in the memory record module and correctly parse each data member in the service record. The memory record module is decoupled from the service module, the same access logic does not need to be repeatedly developed in each module that needs to access the memory record module, the repeated development work is avoided, the service record is used as needed, the storage and access efficiency is improved, other modules can access the record content of the corresponding service record in the memory record module through the storage description information recorded in the parsing record module, one module can access the record content of the service record stored in the memory record module by other modules, and the flexibility and reusability are improved.
[0166] The above is a schematic scheme of the service information processing method provided in the embodiment. It should be noted that the technical scheme of the service information processing method belongs to the same concept as the technical scheme of the service information processing system described above, and the details of the technical scheme of the service information processing method that are not described in detail can be referred to the description of the technical scheme of the service information processing system.
[0167] Corresponding to the method embodiments described above, the present specification also provides a parsing record module embodiment, Figure 6 Fig. 1 shows a structural schematic diagram of a parsing record module provided in an embodiment of the present specification. As shown in the figure, Figure 6 The parsing record module includes:
[0168] The parsing unit 602 is configured to parse a storage information compiling file according to a set decoding rule to obtain a first record structure attribute of a service record, wherein the storage information compiling file defines the first record structure attribute of the service record for a service module and is generated according to a set encoding rule, and the first record structure attribute includes a record identifier of the service record and structure information of the service record.
[0169] The generating unit 604 is configured to generate storage description information of the service record according to the first record structure attribute, wherein the storage description information of the service record is used to access record content of the service record stored in the memory record module by other modules.
[0170] Optionally, the parsing unit 602 is further configured to:
[0171] parse the storage information compiling file based on a debugging information format to obtain the first record structure attribute of the service record; or.
[0172] read a custom format from a set position of the storage information compiling file, parse the storage information compiling file based on the custom format to obtain the first record structure attribute of the service record; or,
[0173] parse the storage information compiling file based on a protocol format of a program database file to obtain the first record structure attribute of the service record.
[0174] Optionally, the service record includes at least one data member, each data member occupies at least one byte, the first record structure attribute includes a record identifier, a member identifier, a member offset address, a data type and a type size, and the member offset address is determined based on the number of occupied bytes; correspondingly, the storage description information also includes the record identifier, the member identifier, the member offset address, the data type and the type size, and the member offset address is determined based on the number of occupied bytes.
[0175] The parsing record module provided by the embodiments of the present specification can generate storage description information of a service record based on a first record structure attribute of the service record, and the storage description information can indicate a record identifier of the service record and structure information of each data member. Only the parsing record module is needed to correctly and completely access record content of a corresponding service record in a memory record module and correctly parse each data member in the service record. The memory record module is decoupled from the service module, and the same access logic does not need to be repeatedly developed in each module that needs to access the memory record module, thereby avoiding repeated development work. The service record is used as needed, thereby improving storage and access efficiency. In addition, other modules can access record content of a corresponding service record in the memory record module through storage description information recorded in the parsing record module. One module can access record content of a service record stored in the memory record module by other modules, thereby improving flexibility and reusability.
[0176] The above is a schematic solution of the analysis record module according to an embodiment of the present specification. It should be noted that the technical solution of the analysis record module belongs to the same concept as the technical solution of the business information processing system described above, and the details of the technical solution of the analysis record module that are not described in detail can be referred to the description of the technical solution of the business information processing system.
[0177] Figure 7 A structural block diagram of a computing device according to an embodiment of the present specification is shown. The components of the computing device 700 include, but are not limited to, a memory 710 and a processor 720. The processor 720 is connected to the memory 710 through a bus 730, and a database 750 is used to save data.
[0178] The computing device 700 also includes an access device 740, which enables the computing device 700 to communicate via one or more networks 760. Examples of these networks include a public switched telephone network (PSTN), a local area network (LAN), a wide area network (WAN), a personal area network (PAN), or a combination of communication networks such as the Internet. The access device 770 can include one or more of any type of network interface (e.g., a network interface card (NIC)) such as an IEEE 802.11 wireless local area network (WLAN) wireless interface, a worldwide interoperability for microwave access (Wi-MAX) interface, an Ethernet interface, a universal serial bus (USB) interface, a cellular network interface, a Bluetooth interface, a near field communication (NFC) interface, etc.
[0179] In an embodiment of the present specification, the above-mentioned components of the computing device 700 and other components not shown in the Figure 7 may be connected to each other, for example, through a bus. It should be understood that Figure 7 The structural block diagram of the computing device shown is only for the purpose of example, and is not a limitation on the scope of the present specification. Those skilled in the art can add or replace other components as needed.
[0180] The computing device 700 can be any type of stationary or mobile computing device, including a mobile computer or mobile computing device (e.g., a tablet computer, a personal digital assistant, a laptop computer, a notebook computer, a netbook, etc.), a mobile phone (e.g., a smartphone), a wearable computing device (e.g., a smart watch, smart glasses, etc.), or other type of mobile device, or a stationary computing device such as a desktop computer or PC. The computing device 700 can also be a mobile or stationary server.
[0181] The processor 720 is configured to execute the following computer-executable instructions to implement the operation steps of the business information processing method.
[0182] The above is a schematic scheme of the computing device of the embodiment. It should be noted that the technical scheme of the computing device and the technical scheme of the business information processing system described above belong to the same concept, and the details of the technical scheme of the computing device that are not described in detail can be referred to the description of the technical scheme of the business information processing system.
[0183] An embodiment of the present specification also provides a computer readable storage medium, which stores computer instructions, and the instructions are executed by a processor to implement the operation steps of the business information processing method.
[0184] The above is a schematic scheme of the computer readable storage medium of the embodiment. It should be noted that the technical scheme of the storage medium and the technical scheme of the business information processing system described above belong to the same concept, and the details of the technical scheme of the storage medium that are not described in detail can be referred to the description of the technical scheme of the business information processing system.
[0185] The specific embodiments of the present specification are described above. Other embodiments are within the scope of the appended claims. In some cases, the actions or steps recited in the claims can be performed in a different order and still achieve desirable results. Additionally, the process depicted in the figures does not necessarily require the particular order shown, or sequential order to achieve the desired results. In some implementations, multitasking and parallel processing can be advantageous.
[0186] The computer readable medium can include any entity or device capable of carrying the computer program code, a recording medium, a USB flash drive, a mobile hard disk, a magnetic disk, an optical disk, a computer memory, a Read-Only Memory (ROM), a Random Access Memory (RAM), an electrical carrier signal, a telecommunications signal, and a software distribution package, etc.
[0187] It should be noted that, for the foregoing method embodiments, the purposes of brief description, they are all described as a series of action combinations, but those skilled in the art should know that the present specification is not limited to the order of the described actions, because according to the present specification, certain steps can be performed in other order or at the same time. Secondly, those skilled in the art should know that the embodiments described in the specification are all preferred embodiments, and the actions and modules involved are not necessarily all the necessary ones in the specification.
[0188] In the above embodiments, the description of each embodiment has its own focus, and the parts not described in detail in a certain embodiment can be referred to the related description of other embodiments.
[0189] The preferred embodiments of the present specification disclosed above are only used to help explain the present specification. The alternative embodiments do not describe all the details and limit the invention to the specific embodiments described. Obviously, according to the content of the present specification, many modifications and changes can be made. The present specification selects and specifically describes these embodiments in order to better explain the principles and practical applications of the present specification, so that those skilled in the art can well understand and use the present specification. The present specification is limited only by the claims and their full scope and equivalents.
Claims
1. A service information processing system characterized by comprising: The system comprises a business module, a memory record module and a record analysis module; The business module is configured to define a first record structure attribute of a business record, and generate a storage information compiling file according to a set coding rule, wherein the first record structure attribute comprises a record identifier of the business record and structure information of the business record; The record analysis module is configured to parse the storage information compiling file according to a set decoding rule, obtain the first record structure attribute of the business record, and generate storage description information of the business record according to the first record structure attribute, wherein the storage description information is used for other modules to access record content of the business record stored in the memory record module, and the set decoding rule corresponds to the set coding rule; The business module is further configured to define a first record basic attribute of the business record, and transmit the first record basic attribute to the memory record module; The memory record module is configured to allocate storage space for the business record based on the first record basic attribute, and record a first storage address of the storage space corresponding to the business record.
2. The service information processing system according to claim 1, characterized by, The business module is further configured to: transmit the first record basic attribute to the memory record module by calling a transmission function; or create a template class interface, and transmit the first record basic attribute to the memory record module through the template class interface.
3. The service information processing system according to claim 2, characterized by, The first record basic attribute comprises a record identifier; the business module is further configured to: in a case where a write instruction of a first record under the record identifier is received, call the transmission function, obtain a return value of the transmission function, and the return value is a target storage address fed back by the memory record module; or in a case where a write instruction of a target record is received, call the template class interface, and obtain a target storage address fed back by the memory record module; wherein the target storage address is a storage address of any storage space in at least one storage space allocated by the memory record module for the record identifier; write record content of the first record to the target storage address.
4. The service information processing system according to any one of claims 1 to 3, characterized by, The business module is further configured to: compile code through a set compiling command of a compiler to generate the storage information compiling file; or generate a custom format, record the first record structure attribute according to the custom format, generate the storage information compiling file, and add the custom format at a set position of the storage information compiling file; or under a set operating system, output the first record structure attribute as a program database file through a set debugging option, and use the program database file as the storage information compiling file.
5. The service information processing system according to any one of claims 1 to 3, characterized by, The record analysis module is further configured to: parse the storage information compiling file based on a debugging information format to obtain the first record structure attribute of the business record; or read a custom format from a set position of the storage information compiling file, parse the storage information compiling file based on the custom format to obtain the first record structure attribute of the business record; or According to a protocol format of a program database file, the stored information compiling file is parsed to obtain a first record structure attribute of the service record.
6. The service information processing system according to any one of claims 1 to 3, characterized by, The system further comprises an access module; The access module is configured to receive a record query instruction for a target record and transmit a target record identifier carried in the record query instruction to the parsed record module; The parsed record module is configured to find target storage description information corresponding to the target record identifier, and obtain structure information of the target record identifier from the target storage description information; According to the target record identifier, a second storage address corresponding to the target record is obtained from the memory record module; According to the second storage address, record content of the target record is obtained from the memory record module, and each data member included in the record content is parsed according to the structure information, and each parsed data member is returned to the access module.
7. The service information processing system according to claim 6, wherein The access module is further configured to receive a modification instruction for the target record, modify the record content of the target record based on the modification instruction, obtain updated record content, and return the updated record content to the parsed record module; The parsed record module is further configured to compare the record content and the updated record content, determine a modification address and modification content of the target record, and modify the record content of the target record stored in the memory record module based on the modification address and the modification content.
8. The service information processing system according to any one of claims 1 to 3, characterized by, The service record comprises at least one data member, each data member occupies at least one byte, the first record structure attribute comprises a record identifier, a member identifier, a member offset address, a data type and a type size, and the member offset address is determined based on the number of occupied bytes; correspondingly, the storage description information also comprises a record identifier, a member identifier, a member offset address, a data type and a type size.
9. A service information processing method, characterized by, The method applied to the parsed record module comprises: According to a set decoding rule, a stored information compiling file is parsed to obtain a first record structure attribute of a service record, wherein the stored information compiling file defines a first record structure attribute of a service record for a service module and is generated according to a set encoding rule, the first record structure attribute comprises a record identifier of a service record and structure information of a service record, and the set decoding rule corresponds to the set encoding rule; According to the first record structure attribute, storage description information of the service record is generated, wherein the storage description information is used for other modules to access record content of a service record stored in a memory record module; A target record identifier transmitted by an access module is received, wherein the target record identifier is carried in a record query instruction for a target record received by the access module; Finding the target record identification corresponding target storage description information, obtaining the structure information of the target record identification from the target storage description information; according to the target record identification, obtaining the corresponding second storage address from the memory record module; according to the second storage address, obtaining the record content of the target record from the memory record module, and according to the structure information, parsing the record content to obtain each data member included, and returning each data member obtained by parsing to the access module. 10.A computing device, comprising: a memory and a processor; the memory is configured to store computer executable instructions, and the processor is configured to execute the computer executable instructions to implement the operation steps of the business information processing method in claim 9. 11.A computer readable storage medium storing computer instructions, which when executed by a processor, implement the operation steps of the business information processing method in claim 9.
Citation Information
Patent Citations
Log recording method and device, computer equipment and storage medium
CN110175161A
Data storage scheme of configuration management system
CN113900726A