CN114265864A - Resource coding method, device, system and electronic equipment - Google Patents

Resource coding method, device, system and electronic equipment Download PDF

Info

Publication number
CN114265864A
CN114265864A CN202111553858.7A CN202111553858A CN114265864A CN 114265864 A CN114265864 A CN 114265864A CN 202111553858 A CN202111553858 A CN 202111553858A CN 114265864 A CN114265864 A CN 114265864A
Authority
CN
China
Prior art keywords
resource
code
prefix code
format
value
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202111553858.7A
Other languages
Chinese (zh)
Inventor
李柄坤
刘阳
谈樑
范陕珊
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Shenzhen Jingtai Technology Co Ltd
Original Assignee
Shenzhen Jingtai Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Shenzhen Jingtai Technology Co Ltd filed Critical Shenzhen Jingtai Technology Co Ltd
Priority to CN202111553858.7A priority Critical patent/CN114265864A/en
Publication of CN114265864A publication Critical patent/CN114265864A/en
Pending legal-status Critical Current

Links

Images

Abstract

The application relates to a resource coding method, a resource coding device, a resource coding system and electronic equipment. The method comprises the following steps: receiving an encoding request from a client, wherein the encoding request comprises a prefix code; responding to the prefix code, and determining a serial number corresponding to the prefix code; combining the prefix code and the serial number to obtain a resource code so as to send the resource code to the client; the prefix code comprises a type bit and a comprehensive section, a first mapping relation exists between the value of the type bit and the format of the comprehensive section, the format of the comprehensive section comprises at least one field, and a second mapping relation exists between the value of each field and the resource attribute. The technical scheme of the application can meet the coding requirements of resources in different fields by using the uniform coding rule.

Description

Resource coding method, device, system and electronic equipment
Technical Field
The present application relates to the field of information processing technologies, and in particular, to a method, an apparatus, a system, and an electronic device for resource encoding.
Background
With the rapid development of computer technology and network technology, there is an increasing need to digitize and standardize resource information to improve the convenience of information interaction. In the related art, a resource may be coded and decoded by a computer system according to a fixed coding rule. As the cross-use of resources across multiple different domains between organizations grows, more and more types of resources need to be managed.
However, the applicant finds that it is difficult to adopt a uniform classification manner between resources in different fields, and a uniform coding rule in the related art cannot meet the requirement of coding the resources in different fields.
Disclosure of Invention
In order to solve or partially solve the problems in the related art, the application provides a method, a device, a system and an electronic device for resource coding, which can meet the coding requirements of resources in different fields by using a uniform coding rule.
A first aspect of the present application provides a method for resource encoding performed by a server, where the method includes: receiving an encoding request from a client, wherein the encoding request comprises a prefix code; responding to the prefix code, and determining a serial number corresponding to the prefix code; combining the prefix code and the serial number to obtain a resource code so as to send the resource code to the client; the prefix code comprises a type bit and a comprehensive section, a first mapping relation exists between the value of the type bit and the format of the comprehensive section, the format of the comprehensive section comprises at least one field, and a second mapping relation exists between the value of each field and the resource attribute.
A second aspect of the present application provides a method of resource encoding performed by a client, the method comprising: generating an encoding request including a prefix code in response to the obtained prefix code; sending a coding request to a server; receiving and outputting a resource code from a server side, wherein the resource code comprises a prefix code and a serial number; the prefix code comprises a type bit and a comprehensive section, a first mapping relation exists between the value of the type bit and the format of the comprehensive section, the format of the comprehensive section comprises at least one field, and a second mapping relation exists between the value of each field and the resource attribute.
A third aspect of the present application provides a resource encoding apparatus, which is disposed on a server side, and includes: an encoding request receiving module configured to receive an encoding request from a client, the encoding request including a prefix code; a serial number determination module configured to determine a serial number corresponding to the prefix code in response to the prefix code; the coding combination module is configured to combine the prefix code and the serial number to obtain a resource code so as to send the resource code to the client; the prefix code comprises a type bit and a comprehensive section, a first mapping relation exists between the value of the type bit and the format of the comprehensive section, the format of the comprehensive section comprises at least one field, and a second mapping relation exists between the value of each field and the resource attribute.
A fourth aspect of the present application provides another resource encoding apparatus, which is disposed at a client, and includes: an encoding request generating module configured to generate an encoding request including a prefix code in response to the obtained prefix code; the encoding request sending module is configured to send an encoding request to the server side; the resource code receiving module is configured to receive and output a resource code from the server side, and the resource code comprises a prefix code and a serial number; the prefix code comprises a type bit and a comprehensive section, a first mapping relation exists between the value of the type bit and the format of the comprehensive section, the format of the comprehensive section comprises at least one field, and a second mapping relation exists between the value of each field and the resource attribute.
A fifth aspect of the present application provides a system for resource encoding, comprising: a server configured to perform the method as described above; a client configured to perform the method as described above.
A sixth aspect of the present application provides an electronic device, comprising: a processor; a memory having executable code stored thereon, which when executed by the processor, causes the processor to perform the above method.
A seventh aspect of the present application also provides a computer-readable storage medium having stored thereon executable code, which, when executed by a processor of an electronic device, causes the processor to perform the above-mentioned method.
An eighth aspect of the present application also provides a computer program product comprising executable code which, when executed by a processor, implements the above method.
According to the resource coding method, device, system and electronic equipment, the prefix code comprises the type bit and the comprehensive section. The type bits are used for indicating different types of resources, and the value of each type bit corresponds to the comprehensive segments with different formats, so that the different types of resources can be represented by using fields of the comprehensive segments with different formats, and the diversified requirements of the different types of resources on the coding formats can be met. The embodiment of the application can at least partially solve the problem that different types of resources in the related technology need to be coded by the same coding rule, so that different types of resources can be coded by the uniform coding rule, and the diversified requirements of the different types of resources on coding formats can be met.
It is to be understood that both the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the application.
Drawings
The foregoing and other objects, features and advantages of the application will be apparent from the following more particular descriptions of exemplary embodiments of the application as illustrated in the accompanying drawings wherein like reference numbers generally represent like parts throughout the exemplary embodiments of the application.
Fig. 1 is a schematic diagram illustrating a process of resource encoding in the related art;
FIG. 2 schematically illustrates a process diagram of resource encoding according to an embodiment of the present application;
FIG. 3 schematically illustrates an exemplary system architecture of methods, apparatuses, systems and electronic devices to which resource coding may be applied, according to embodiments of the present application;
FIG. 4 schematically illustrates a flow diagram of a method of resource encoding according to an embodiment of the present application;
FIG. 5 schematically shows a schematic diagram of resource encoding according to an embodiment of the application;
FIG. 6 schematically illustrates another resource encoding according to an embodiment of the present application;
FIG. 7 schematically illustrates another resource encoding according to an embodiment of the present application;
FIG. 8 schematically illustrates a flow diagram of another method of resource encoding according to an embodiment of the present application;
FIG. 9 is a block diagram schematically illustrating an apparatus for resource encoding according to an embodiment of the present application;
FIG. 10 is a block diagram schematically illustrating an apparatus for resource encoding according to an embodiment of the present application;
FIG. 11 is a block diagram schematically illustrating another system for resource encoding according to an embodiment of the present application;
fig. 12 schematically shows a block diagram of an electronic device implementing a method of resource encoding according to an embodiment of the present application.
Detailed Description
Embodiments of the present application will be described in more detail below with reference to the accompanying drawings. While embodiments of the present application are illustrated in the accompanying drawings, it should be understood that the present application may be embodied in various forms and should not be limited to the embodiments set forth herein. Rather, these embodiments are provided so that this disclosure will be thorough and complete, and will fully convey the scope of the disclosure to those skilled in the art.
The terminology used herein is for the purpose of describing particular embodiments only and is not intended to be limiting of the application. The terms "comprises," "comprising," and the like, as used herein, specify the presence of stated features, steps, operations, and/or components, but do not preclude the presence or addition of one or more other features, steps, operations, or components.
All terms (including technical and scientific terms) used herein have the same meaning as commonly understood by one of ordinary skill in the art unless otherwise defined. It is noted that the terms used herein should be interpreted as having a meaning that is consistent with the context of this specification and should not be interpreted in an idealized or overly formal sense.
It should be understood that although the terms "first," "second," "third," etc. may be used herein to describe various information, these information should not be limited to these terms. These terms are only used to distinguish one type of information from another. For example, first information may also be referred to as second information, and similarly, second information may also be referred to as first information, without departing from the scope of the present application. Thus, a feature defined as "first" or "second" may explicitly or implicitly include one or more of that feature. In the description of the present application, "a plurality" means two or more unless specifically limited otherwise.
Before describing the technical solutions of the present application, some technical terms related to the present application in the field are described.
Encoding, is the process of converting information from one form or format to another. The code is also referred to as code of a computer programming language. Specifically, words, numbers or other objects can be coded into numbers by using a preset rule, or information and data can be converted into specified electric pulse signals.
Decoding is the inverse of encoding.
Master Data (MD, also called reference Data) refers to Data shared among systems, such as related Data of customers, suppliers, accounts, and organizational departments. The main data changes slowly compared to recording data with large fluctuations in business activities, etc. In the formal relational data model, transaction records (e.g., line items of an order) may call up master data through keywords (e.g., order header or invoice number and product code).
A field is a field that describes a feature (e.g., an attribute) of a resource and has a unique field identifier for computer identification.
In the resource encoding scheme in the related art, a computer program or manual classification may be adopted to implement one or a combination of several of the following encoding methods: a stream coding method, a block coding method, a digital segmentation method, a post-digit coding method, or an implied coding method.
The resource encoding in the related art may be generated by a fixed encoding rule, such as encoding and decoding by a computer system according to the fixed encoding rule. For example, EAN commodity bar codes established by the international article code association, express bill number codes inside each express logistics company, and the like.
The coding method of the related art meets the basic requirement of coding management of resources in partial fields and carries main data information of a certain scale. However, the related art encoding method also has drawbacks as shown below.
For example, as the cross-use of resources across different domains between organizations grows, the types of resources that need to be managed gradually increase. However, it is difficult to adopt a uniform classification method between resources in different fields, and a uniform coding rule required by a conventional resource coding method is often difficult to adapt to different types of resources. Therefore, a unified encoding system is needed to manage the resource encoding of various rules.
For example, the master data is shared data between systems, and plays an important role in data exchange within an organization. In the aspect of resource management, one piece of main data in a main data management system usually corresponds to one resource, the main data of the resource and the resource code usually show a one-to-one or one-to-many relationship, and a uniform coding system is needed to directly manage the main data, so that the problem of data inconsistency or errors is prevented. Some conventional resource coding systems do not contain the main data information, and some of the conventional resource coding systems need to manually synchronize the main data information in the resource coding management system and the main data management system, so that the use cost and the error rate are increased.
For example, as the degree of organization informatization is improved, the application amount of resource coding is increased, the resource coding needs to be optimized for readability of human and computer, and the same coding rule should be capable of generating several different code information readable by human and computer at the same time. However, the related art encoding method is only computer-readable and can generate only one kind of code.
Fig. 1 is a schematic diagram illustrating a process of resource encoding in the related art.
Referring to fig. 1, in order to facilitate the respective resource codes to be allocated to the different types of resources, the related art may set a coding rule for each type of resource according to the characteristics of the type of resource. When a certain type of resource is coded, the coding can be performed according to a preset coding rule. A first encoding rule for an electronic part type and a second encoding rule for a chemical type are shown in fig. 1. Attributes such as electronic components include, but are not limited to: the number of CPUs, the number of GPUs, storage space, whether a display screen exists or not, and the like. Attributes of chemicals include, but are not limited to: combustibles, oxidants, poisons, corrosives, catalysts, stabilizers, odors, Chemical Abstracts Service (CAS) numbers, and the like. If the same coding rule is adopted to code the electronic parts and the chemicals respectively, redundant codes in the codes are excessive.
Fig. 2 schematically shows a process diagram of resource encoding according to an embodiment of the present application.
Referring to fig. 2, the encoding may be performed using a uniform encoding rule for different types of resources. The resource codes in the unified coding rule comprise type bits, and the type bits can represent different types of resources. There is a mapping relationship between the type bit and the format of the other bits so that the format of the other bits can be determined based on the type bit to determine the meaning represented by each field in the other bits based on the format. For example, a third field in the code for the electronic part indicates CPU data, and a third field in the code for the chemical indicates whether flammable or not. It should be noted that the formats of the fields at the same position in the resource codes of different types may be the same or different. If the fourth field in the encoding for the electronic component represents the year of production, the fourth field may be 4 bits in length. If the fourth field in the code for the chemical indicates presence or absence of an odor, the length of the fourth field may be 1 bit.
By the method, different types of resources can be coded by adopting a uniform coding rule, and fewer redundant codes are generated in the coding, so that the coding, the main information corresponding to the coding and the like can be conveniently and quickly generated.
A method, an apparatus and an electronic device for resource coding according to an embodiment of the present application will be described in detail below with reference to fig. 3 to 12.
Fig. 3 schematically illustrates an exemplary system architecture of a method, an apparatus, a system and an electronic device to which resource coding may be applied according to an embodiment of the present application. It should be noted that fig. 3 is only an example of a system architecture to which the embodiments of the present application may be applied to help those skilled in the art understand the technical content of the present application, and does not mean that the embodiments of the present application may not be applied to other devices, systems, environments or scenarios.
Referring to fig. 3, a system architecture 300 according to this embodiment may include terminal devices 301, 302, 303, a network 304, and a server 305. The network 304 serves as a medium for providing communication links between the terminal devices 301, 302, 303 and the server 305. Network 304 may include various connection types, such as wired, wireless communication links, or fiber optic cables, to name a few.
The user may use the terminal device 301, 302, 303 to interact with other terminal devices and the server 305 via the network 304 to receive or send information and the like, such as sending a request for encoding, a request for a primary data query and receiving a resource encoding, primary data information and the like. The terminal devices 301, 302, 303 may be installed with various communication client applications, such as a web browser application, a database-type application, a search-type application, an instant messaging tool, a mailbox client, social platform software, and other applications.
The terminal devices 301, 302, 303 include, but are not limited to, smart desktop computers, tablet computers, laptop portable computers, code scanning devices, and other electronic devices that can support functions such as internet access, code scanning, picture taking, and the like.
The server 305 may receive the encoding request, generate a resource encoding, and send to the terminal devices 301, 302, 303. For example, server 305 may be a back office management server, a cluster of servers, or the like.
It should be noted that the number of terminal devices, networks, and servers is merely illustrative. Any number of terminal devices, networks, and cloud-ends may be provided as desired.
Fig. 4 schematically shows a flow chart of a method of resource encoding according to an embodiment of the application.
As shown in fig. 4, the embodiment provides a method for resource encoding, where the method includes operations S410 to S430, and specifically as follows:
in operation S410, an encoding request is received from a client, the encoding request including a prefix code.
In this embodiment, when some resources need to be encoded, an encoding request may be sent from the client to the server. If the user already knows the prefix codes of the resources, the prefix codes can be sent to the server side to encode the resources. The resource may be a real object, such as equipment, a raw material, and the like. Resources may also be non-physical, such as electronic documents, volumes, operating systems, and the like.
It should be noted that if the user does not know the prefix code of the resource, the user can perform a query on the system. For example, a user may enter query terms on a client and send to a server. After the server side matches the resource attribute which is the same as or similar to the query word, the server side can feed back the prefix code corresponding to the resource attribute to the client side.
In operation S420, in response to the prefix code, a serial number corresponding to the prefix code is determined.
In this embodiment, the server may store a history serial number corresponding to the prefix code. After receiving the prefix code, the historical serial number may be updated, such as by self-adding the serial number, resulting in a serial number for the encoding request.
In some embodiments, determining, in response to the prefix code, the serial number corresponding to the prefix code may include the following operations.
First, in response to a prefix code, a serial number cursor corresponding to the prefix code is determined. Wherein, the serial number cursor can be the current value recorded in the accumulator, etc.
And then, updating the historical serial number corresponding to the serial number cursor based on a preset rule to obtain the serial number. Wherein the preset rules include but are not limited to: one is added one by one, alternately accumulated one by one, and the like. For example, the field in which the serial number is located is represented by a 10-digit self-incrementing number.
In operation S430, the prefix code and the serial number are combined to obtain a resource code, so as to send the resource code to the client.
The prefix code comprises a type bit and a comprehensive section, a first mapping relation exists between the value of the type bit and the format of the comprehensive section, the format of the comprehensive section comprises at least one field, and a second mapping relation exists between the value of each field and the resource attribute.
The type bits identify the type to which the asset belongs, as in the field of computer-assisted drug development, including but not limited to: server, chemical, etc. in completely different areas.
The integrated segment is indexed to a corresponding detailed encoding format according to the major category and the format, and an identifier for identifying the main data information can be stored in the integrated segment.
The main data refers to shared data between systems. Depending on the business logic, the master data may be any data that encompasses everything. Can be understood as a more important data of a resource.
For example, when describing a server, a provider, the number of CPUs, the number of memories, and the like may be defined as main data. For another example, when a reagent for an experiment is described, a reagent type, a CAS number, and the like may be defined as main data. For another example, when describing an express package, a delivery country, a delivery province, a package type, and the like may be defined as main data.
Fig. 5 schematically shows a schematic diagram of resource encoding according to an embodiment of the application.
Referring to fig. 5, a specific resource can be identified by adding a serial number to the complete prefix code. The serial number is used for ensuring the uniqueness of the resource code, the complete prefix code can identify one resource, and the serial number can be added to uniquely identify one specific resource. The value of the type bit determines the format of each field in the composite segment, such as the length of the first field, the value type, the resource attribute represented, the meaning of the field value, etc. Thus, the division method of the fields in the integrated section can be determined based on the first mapping relation to determine the fields. The meaning of the value representation of each field is then determined based on the second mapping. Therefore, in this embodiment, the main data information of the resource may be determined based on the first mapping relationship and the second mapping relationship, and then a serial number allocated to the current prefix code is combined, so that a certain resource may be globally and uniquely identified.
The resource encoding, as shown in fig. 5, may include a full prefix code and a serial number. Wherein the full prefix code includes a type bit and a composite segment. If the length of the type bit is 2 bits, the length of the integrated segment bit is 13 bits. The serial number may be 10 bits in length.
It should be understood that the length of the type bit, the integrated segment bit, and the serial number may be determined according to specific scene requirements. If there are multiple different types of resources, then more bits of the type bit may be set. For example, if the number of resources of the same type is very large and a serial number of 10 bits cannot meet the demand for the serial number, a greater number of serial number bits may be set.
Fig. 6 schematically shows a schematic diagram of another resource encoding according to an embodiment of the present application.
Referring to fig. 6, the prefix code further includes a version bit, and a third mapping relationship exists between all values of the type bit and the version bit and the format of the integrated segment.
The version bit identifies the format version of the resource code, which needs to be upgraded if a new format needs to be upgraded to meet the new requirements of resource management under this type. Wherein the numbers in the formatted segment map the segmented coding information in the later integrated segment. Taking the encoding of the cloud server as an example, if only the number of CPUs and the number of memories are used as fields, the asset code containing only the fields of "CPUs" and "memories" may be defined as version 1. As the business iterates, different cloud providers are introduced, and if it is necessary to distinguish the providers in the encoding, a new field "provider" may be added. Accordingly, the version of the new field-added asset code may be upgraded to 2 so that the new and old versions of the code may be distinguished.
Referring to fig. 5 and fig. 6 together, unlike the resource encoding shown in fig. 5, the resource encoding in fig. 6 further includes a format bit, and a combination of values of the type bit and the version bit is used as an index value together to determine a format of the integrated segment, such as a length of each field, a resource attribute represented by each field, and the like.
It should be noted that, the user can maintain the type bit, the version bit, and the integrated segment based on the authority assigned by the user.
For example, type information corresponding to the type bits may be stored in the first set of data. Version information corresponding to the version bits may be stored in the second data set. Resource attribute information corresponding to the fields may be stored in a third data set. It should be noted that the first data set, the second data set, and the third data set may be the same data set or different data sets.
Specifically, the user authority may be divided into four categories, namely "format manager", "master data manager", "producer", and "read-only user", and the field formats of the resource codes in the respective authorities and the resource attributes corresponding to the values thereof are managed respectively.
Referring to fig. 6, the full prefix code is the sum of the three bit segments, which is defined as the full prefix code in this embodiment, and the full main data information of a specific resource can be identified according to the full prefix code.
In some embodiments, the format of the integrated segment may include M valid fields and N reserved fields, the values of M + N being equal for different types of bits, M and N being integers greater than zero. The valid field indicates that the value of the current field has a corresponding resource attribute. The reserved field may be a null field.
Specifically, the multi-bit integrated segment may be field-divided, and a field name, a length, and a data type of each field may be defined.
Wherein, the field name: the field representing this bit field corresponds to the name of the primary data field being represented.
Length: representing the length of the decimal number occupied by the bit field.
Data type: the mapping relation is managed by the system according to the actual meaning corresponding to the number of the digit. If 1 represents AWS and 2 represents Tencent cloud, the mapping relation is stored in the system. The actual meaning of the number representing this bit corresponds to the mapping relationship managed by the user himself. If 1 represents what, 2 represents what, the server side does not care about and save, and the user stores in the system.
Specifically, the enumeration represents that this bit field has its interpretation and may select one of the enumeration data already saved, the number representation is filled in by the user, which generally means the bit field of the number itself, e.g. the number type bit field 08 representing the number of CPUs represents 8 CPUs. In addition, placeholders may be used as reserved fields. The placeholder is used for finding that the 13-bit comprehensive section is still remained after the user defines all the main data bit sections, and 0 can be supplemented in the back so as to ensure that the comprehensive section has a uniform length.
In some embodiments, the method may further include the following operations. After determining the serial number corresponding to the prefix code, a check value for the prefix code and/or the serial number is generated based on a check function.
The check value may be generated only for the prefix code, only for the serial number, or for both the prefix code and the serial number. The main role of the check value is to ensure that the encoded data is not anomalous or missing.
Accordingly, combining the prefix code and the serial number to obtain the resource code may include: and generating the resource code based on the prefix code, the serial number and the check value.
Fig. 7 schematically shows a schematic diagram of another resource encoding according to an embodiment of the present application.
Please refer to fig. 6 and 7 together. Unlike fig. 6, the resource code in fig. 7 further includes a check bit. The length of the check bits may depend on the adopted check algorithm. For example, the check bits may be 1 bit, 2 bits, 3 bits or more, and so on. Wherein, the more the number of bits, the higher the reliability of the check result, but the more the code bits will be occupied. The check bits may be placed at multiple locations in the resource encoding. For example, the check bit may be set between the last position, the starting position, the type bit and the format bit, the format bit and the synthesis segment, or the synthesis segment and the serial number of the resource coding, which is not limited herein.
For example, the check bits are generated by all bits in the resource encoding according to a uniform check function for ensuring that the encoded data is not abnormal and lost. The check function may be the result of adding each previous digit, and the remainder is taken for 10 to obtain a check code with only one digit. If the code is damaged or some bit segments are lost, the prefix code and/or serial number are executed once more by the check function, and the obtained value is compared with the last bit check code. If the comparison result is inconsistent, the prefix code and/or the serial number are damaged or lost.
For example, referring to fig. 7, after determining the prefix code and the pipeline code, an idempotent check code generation function may be used to generate a check code appended to the last by inputting a 27-bit code to generate a complete 28-bit code to verify that the code is not missing or corrupted.
It should be noted that the check function may adopt various functions in the related art. For example, the resource code may be converted into a binary form, then the number of 1 s therein is determined to obtain a 10-ary integer, and then the 10-ary integer is left over for 10 to obtain a check code with only one digit. And are not limited herein.
The process of resource coding is exemplified by an application scenario of drug development.
A drug research and development department of an enterprise researches and develops drugs in a mode of combining cloud computing and experiments. In the research and development process, the organization needs to perform resource coding management on resources such as cloud computing servers and chemical reagents used in the research and development process.
First, a format may be created.
Specifically, a format administrator creates a cloud server encoding format with type 01 and format encoding 01 in the system, and may define the main data field thereof as shown in table 1 according to business requirements.
TABLE 1
Name of field Type (B) Code length
Suppliers of goods Enumeration 2
Example types Enumeration 2
Number of nuclei Number of 3
Memory (G) Number of 3
Reserved bit Placeholder 3
And a chemical coding format with the type of 02 and the format code of 01 is created, and the main data field of the chemical coding format is defined as shown in table 2 according to the requirements of the service.
TABLE 2
Name of field Type (B) Code length
Chemical classification Enumeration 3
CAS number for chemicals Number of 10
And so on to define the type and format of other resources that need to be managed.
Then, the master data is entered.
Specifically, a master data administrator enters the master data information of each resource in the system according to the actual master data information of each resource and generates a complete prefix code.
Next, a resource code is generated and persisted.
Specifically, after chemicals are purchased, corresponding chemical resource codes are generated and converted into bar codes, and the bar codes are printed by printing equipment and then attached to the purchased chemicals for unified management.
Aiming at the cloud server, after the cloud server is started, an internal cloud server management system is organized to apply for a resource code of the cloud server from a server side and store the resource code in a database of the cloud server.
The following is an exemplary description of the method of using resource coding.
In some embodiments, the method may further include the following operations.
First, a main data query request from a client is received, wherein the main data query request comprises a prefix code to be queried. The prefix code may be a resource code obtained by the terminal device through code scanning or the like, and then the code is intercepted from a specified position of the resource code by the terminal device or the server. In addition, the prefix code may also be a code obtained by searching a database to obtain a resource code and then intercepting the resource code from a specified position. The obtaining method of the prefix code to be queried is not limited herein.
Then, in response to the prefix code to be queried, the format of the integrated segment corresponding to the value of the type bit in the prefix code to be queried is determined based on the first mapping relationship, or the format of the integrated segment corresponding to all values of the type bit and the version bit in the prefix code to be queried is determined based on the third mapping relationship.
Then, resource attributes corresponding to the values of the fields of the integrated segment are determined based on the second mapping relationship.
Then, a primary data query result corresponding to the primary data query request is determined based on the resource attributes corresponding to the values of the fields of the integrated segment, so as to send the primary data query result to the client.
For example, the examples shown in tables 1 and 2 will be described as examples.
When the chemical information needs to be inquired for the chemical, the bar code is scanned through a code scanning device connected with the terminal device, the code scanning information is sent to the server by the terminal device, and the server determines the main data information of the chemical in the warehouse.
For a cloud server, the cloud server management system may directly query main data corresponding to a resource code of a certain cloud server through an application interface (api), such as webapi.
It can be seen from the above embodiments that each different resource can achieve the requirement of acquiring the resource main data and the code by the above method.
In some embodiments, in order to enhance the readability of the user for the primary data information. The host data may be translated, such as by dialect conversion.
Dialects are a representation of the original code, for example, representing a 28-bit original resource code as a two-dimensional code, or bar code, or a form of digital segmentation that is more easily understood by users for adaptation to a variety of input and output scenarios. Any 28-bit code can be converted to a dialect by a uniform idempotent function, and vice versa.
Specifically, after determining the resource attribute corresponding to the value of each field of the integrated segment based on the second mapping relationship, the method may further include: dialect information corresponding to the resource attributes is determined based on the dialect type.
For example, a dialect is an expression of one other form of the above-described code, so as to be more readable in other systems or humans. By defining functions for encoding and decoding two idemponents, various dialect types can be added in the server side. When the dialect conversion is requested, the system adopts an adapter mode, finds different dialect plug-ins according to the name of the dialect, and calls the coding and decoding methods therein to realize the conversion between dialects. For example, for the code 20001000101, a dialect can be defined for easy reading, in which 0 is abbreviated to 2.1.1.1. For another example, the code is represented by a two-dimensional code or a bar code, which can be called dialect.
The language conversion may be implemented by the cloud or locally, which is not limited herein.
Accordingly, determining a primary data query result corresponding to the primary data query request based on the resource attributes corresponding to the values of the fields of the integrated segment includes: dialect primary data query results corresponding to the primary data query request are determined based on dialect information corresponding to values of the fields of the integrated segment.
Further, the client's account may be of dialect type. Therefore, the dialect type can be conveniently determined based on the logged account so as to convert the main data information into a required dialect expression form.
In some embodiments, the user may also conveniently query for the prefix code in the manner shown below.
For example, the above method may further include the following operations.
First, a prefix code query request is received from a client, wherein the prefix code query request comprises query words. The query term may be a keyword or the like input by the user at the client. If the user wishes to query the server for a prefix code, the server may be entered at the client. The client sends the keyword server to the server.
Then, in response to the query term, a format of at least one integrated segment matching the query term and a value of each field in the at least one integrated segment are determined based on the second mapping relationship. For example, the format of the integrated segment corresponding to the keyword server and the value of each field may be determined by means of database matching.
Then, a value of a type bit corresponding to a format of the at least one integrated segment is determined based on the second mapping relationship, or a value of a type bit and a version bit corresponding to a format of the at least one integrated segment is determined based on the third mapping relationship. The value of the type bit and/or the version bit may be determined because of a mapping between the value of the type bit and the format of the integrated segment, or between the values of the type bit and the version bit and the format of the integrated segment.
Then, for each of the synthesized segment formats, a candidate prefix code is determined based on the value of the type bit and/or the value of the version bit and the values of the fields, and the candidate prefix code is transmitted to the client. For example, a complete prefix code may be obtained by concatenating values of the type bit and/or version bit, and values of fields of the segment.
In some embodiments, the format of the composite segment may also be selected by the user to quickly determine the prefix code.
For example, the above method may further include the following operations.
First, after determining the format of at least one integrated segment matched with the query word and the value of each field in the at least one integrated segment based on the second mapping relation, sending the resource attribute corresponding to the value of each field of at least part of the at least one integrated segment to the client.
Then, a format of the specified integrated segment is received from the client.
Accordingly, determining the value of the type bit corresponding to the format of the at least one integrated segment based on the second mapping relationship, or determining the values of the type bit and the version bit corresponding to the format of the at least one integrated segment based on the third mapping relationship may include: the value of the type bit corresponding to the format of the specified integrated segment is determined based on the second mapping relationship, or the values of the type bit and the version bit corresponding to the format of the specified integrated segment are determined based on the third mapping relationship.
Through the method, the user can determine the corresponding type bit and the version bit after selecting the format of the comprehensive section, and the hit rate of the prefix code returned by the server side is improved.
In the embodiment of the application, in order to meet the resource coding management requirements in the resource cross application background of different fields, a uniform resource coding method based on type bits and comprehensive segments (used for storing main data information) is designed. The type bits and the formats of the comprehensive segments have mapping relations, so that the comprehensive segments with different formats can be set for different types of resources, the requirements of various resources on the formats are met, and the unified coding of various different types of resources is realized.
In addition, the resource codes which are easy to understand can be generated for different users respectively based on the same set of coding rules by means of dialect format information, and mutual conversion can be easily realized among different dialects.
Another aspect of the present application also provides a resource encoding method performed by a client.
Fig. 8 schematically shows a flow chart of another method of resource encoding according to an embodiment of the present application.
Referring to fig. 8, the method may include operations S810 to S830.
In operation S810, an encoding request including a prefix code is generated in response to the obtained prefix code. The prefix code may refer to the related content as shown above, and will not be described in detail here.
In operation S820, an encoding request is transmitted to the server side. It should be noted that the encoding request may include account login information, login device information, login address information, and the like, in addition to the prefix code, so as to facilitate the server side to authenticate the client and/or provide a specific service.
In operation S830, a resource code from the server side is received and output, and the resource code includes a prefix code and a serial number.
The prefix code comprises a type bit and a comprehensive section, a first mapping relation exists between the value of the type bit and the format of the comprehensive section, the format of the comprehensive section comprises at least one field, and a second mapping relation exists between the value of each field and the resource attribute.
In this embodiment, if a complete prefix code is defined, when scheduling or completing purchasing for use, a user may select a certain type of resource (i.e., the complete prefix code) to generate a resource code for scheduling. The server side records corresponding serial number cursors in the database for each complete prefix code. When the client applies for the resource code, the server can find the corresponding serial number cursor according to the complete prefix code, and then the serial number is increased by itself. And adding the obtained latest serial number to the back of the complete prefix code to obtain the resource code containing the main data information. Regarding the serial number cursor, the server can record what the maximum serial number corresponding to the complete prefix code is. When the resource coding request is received again, updating operation is carried out on the maximum serial number corresponding to the complete prefix code, such as +1 operation, so that the generated resource coding is not repeated.
Specifically, the client may send the received resource code to the printer to print a corresponding one-dimensional code, two-dimensional code, or the like. For example, the client may display the received resource code on a display screen for scanning, etc. For example, the client may store the received asset code in a database, to edit the asset code, and so on.
For example, the resource coding printing device can be formed by a universal printer interfacing with an application interface provided by a server side. During printing, a user uses the main data information to retrieve the corresponding complete prefix code at the server end through the application interface, selects the required resource and calls the web service to generate the resource code. Then, calling dialect conversion and other interfaces to obtain data to be printed, and calling a printing interface of a printer to print the information to obtain various resource codes such as bar codes, two-dimensional codes, character codes and the like.
Where dialects are an alternative form of expression of the resource coding described above to facilitate easier reading on other systems or for users. By defining the function of encoding (encode), decoding (decode) two powers, etc., the user can add a plurality of dialect types in the server side. When the dialect is converted by the request, the server side can adopt an adapter mode to find different dialect plug-ins according to the name of the dialect. Then, calling the encode method or decode method therein can realize the pairwise conversion between different dialects.
In some embodiments, the method may further include the following operations.
Firstly, obtaining a resource code by scanning a graphic code or querying a database;
then, the resource code is sent to a server side;
and then, receiving a main data query result corresponding to the resource code from the server, wherein the main data query result comprises resource attributes determined by the server based on the prefix code, the first mapping relation and the second mapping relation in the resource code, or resource attributes determined by the server based on the prefix code, the second mapping relation and a third mapping relation in the resource code, and the third mapping relation is a relation between all values of the type bit and the version bit in the prefix code and the format of the comprehensive segment.
Specifically, the code scanning device can be formed by connecting an application interface provided by the server side with the universal code scanning device, so that a user can inquire main data information corresponding to the resource codes of the codes scanned by the code scanning device. When the resource codes are scanned, the code scanning device firstly acquires the data in the resource codes and then inquires the main data information corresponding to the data in the resource codes through the service provided by the server side.
In some embodiments, in order to improve user readability of the main data information, the method may further include the following operations.
And sending the dialect type to the server side before sending the resource code to the server side.
Correspondingly, the receiving of the main data query result corresponding to the resource code from the server side includes: and receiving a dialect main data query result corresponding to the resource code and the dialect type from the server side.
In some embodiments, the user may be facilitated to find the prefix code as follows.
Specifically, the above method may further include the following operations.
First, a query term is received. For example, a user enters a query term on a client, such as a server, a rack, an 8-core server, and so on.
And then, responding to the query word, and sending the query word to the server side. Therefore, the server side can match the query words conveniently to determine the prefix codes corresponding to the query words.
Then, receiving a prefix code corresponding to the query word from the server, wherein the prefix code is determined by the server based on the query word, the first mapping relation and the second mapping relation, or the prefix code is determined by the server based on the query word, the second mapping relation and the third mapping relation; the third mapping relationship is a relationship between all values of the type bit and the version bit in the prefix code and the format of the integrated segment.
The first mapping relation, the second mapping relation and the third mapping relation may refer to the above related contents, and the process of resource encoding may refer to the above related contents, which is not described in detail herein.
The resource coding method provided by the embodiment of the application can respectively define a plurality of different coding specifications aiming at different types of resources so as to adapt to the management needs of the resources in different fields.
In addition, the main data of the resource is effectively managed by binding the main data and the codes and storing and distributing the resource main data in the server side in a uniform code mode.
In addition, the dialect function is provided for the resource coding method, so that the readability of the resource coding can be improved in some scenes, and the readability of the resource coding can be realized between different systems and different users.
Another aspect of the present application also provides an apparatus for resource encoding.
Fig. 9 is a block diagram schematically illustrating a resource encoding apparatus according to an embodiment of the present application.
Referring to fig. 9, the apparatus 900 for resource encoding may include: an encoding request receiving module 910, a serial number determining module 920 and an encoding combining module 930.
Wherein the encoding request receiving module 910 is configured to receive an encoding request from a client, the encoding request including a prefix code.
The serial number determination module 920 is configured to determine a serial number corresponding to the prefix code in response to the prefix code.
The code combining module 930 is configured to combine the prefix code and the serial number to obtain a resource code, so as to send the resource code to the client. The prefix code comprises a type bit and a comprehensive section, a first mapping relation exists between the value of the type bit and the format of the comprehensive section, the format of the comprehensive section comprises at least one field, and a second mapping relation exists between the value of each field and the resource attribute.
In some embodiments, the prefix code may further include a version bit, and a third mapping relationship exists between all values of the type bit and the version bit and the format of the composite segment.
In some embodiments, the apparatus 900 may further include: the device comprises a main data query request module, a comprehensive section format determining module, a resource attribute determining module and a query result returning module.
The main data query request module is configured to receive a main data query request from a client, wherein the main data query request comprises a prefix code to be queried.
The comprehensive segment format determining module is configured to determine, in response to the prefix code to be queried, a format of a comprehensive segment corresponding to a value of the type bit in the prefix code to be queried based on the first mapping relationship, or determine a format of a comprehensive segment corresponding to all values of the type bit and the version bit in the prefix code to be queried based on the third mapping relationship.
The resource attribute determination module is configured to determine resource attributes corresponding to values of the fields of the integrated segment based on the second mapping relationship.
The query result returning module is configured to determine a primary data query result corresponding to the primary data query request based on the resource attributes corresponding to the values of the fields of the integrated segment to send the primary data query result to the client.
In some embodiments, the apparatus 900 further comprises: and a dialect information determination module.
Wherein the dialect information determination module is configured to determine the dialect information corresponding to the resource attribute based on the dialect type after determining the resource attribute corresponding to the value of each field of the integrated segment based on the second mapping relationship.
Accordingly, the query result return module is further configured to determine a dialect primary data query result corresponding to the primary data query request based on the dialect information corresponding to the values of the fields of the integrated segment.
In some embodiments, the apparatus 900 may further include: the device comprises a prefix code query request receiving module, a format and field value determining module, a type and version determining module and a candidate prefix code determining module.
The prefix code query request receiving module is configured to receive a prefix code query request from a client, wherein the prefix code query request comprises query words.
The format and field value determination module is configured to determine, in response to the query term, a format of at least one synthesized segment matching the query term and a value of each field in the at least one synthesized segment based on the second mapping relationship.
The type and version determination module is configured to determine a value of a type bit corresponding to a format of the at least one integrated segment based on the second mapping relationship or determine a value of a type bit and a version bit corresponding to a format of the at least one integrated segment based on the third mapping relationship.
The candidate prefix code determination module is configured to determine, for each of the formats of the composite segments, a candidate prefix code based on the value of the type bit and/or the value of the version bit and the values of the fields, and to transmit the candidate prefix code to the client.
In some embodiments, the apparatus 900 may further include: a candidate resource attribute sending module and a specified comprehensive segment format receiving module.
And the candidate resource attribute sending module is configured to send the resource attributes corresponding to the values of the fields of at least part of the at least one integrated section to the client after determining the format of the at least one integrated section matched with the query word and the values of the fields in the at least one integrated section based on the second mapping relation.
The specified composite segment format receiving module is configured to receive a format of the specified composite segment from the client.
The type and version determination module is specifically configured to determine a value of a type bit corresponding to the format of the specified integrated segment based on the second mapping relationship or to determine a value of a type bit and a version bit corresponding to the format of the specified integrated segment based on the third mapping relationship.
In some embodiments, the format of the integrated segment includes M valid fields and N reserved fields, the values of M + N being equal for different type bits, M and N being integers greater than zero.
In certain embodiments, the serial number determination module 920 includes: a cursor determining unit and a serial number updating unit.
Wherein the cursor determination unit is configured to determine, in response to the prefix code, a serial number cursor corresponding to the prefix code.
The serial number updating unit is configured to update the historical serial number corresponding to the serial number cursor based on a preset rule to obtain the serial number.
In some embodiments, the apparatus 900 may further include: and a check value generation module.
Wherein the check value generation module is configured to generate a check value for the prefix code and/or the serial number based on the check function after determining the serial number corresponding to the prefix code.
Accordingly, the code combining module 930 is specifically configured to generate the resource code based on the prefix code, the serial number and the check value.
Another aspect of the present application also provides an apparatus for resource encoding.
Fig. 10 schematically shows a block diagram of another apparatus for resource encoding according to an embodiment of the present application.
As shown in fig. 10, the apparatus 1000 for resource encoding may include: an encoding request generating module 1010, an encoding request transmitting module 1020 and a resource encoding receiving module 1030.
Wherein the encoding request generating module 1010 is configured to generate an encoding request including a prefix code in response to the obtained prefix code.
The encoding request sending module 1020 is configured to send an encoding request to the server side.
The resource code receiving module 1030 is configured to receive and output a resource code from the server side, where the resource code includes a prefix code and a serial number. The prefix code comprises a type bit and a comprehensive section, a first mapping relation exists between the value of the type bit and the format of the comprehensive section, the format of the comprehensive section comprises at least one field, and a second mapping relation exists between the value of each field and the resource attribute.
In some embodiments, the apparatus 1000 may further include: the system comprises a code scanning module, a resource coding transmission module and a main data query result receiving module.
Wherein, the code scanning module is configured to obtain the resource code by scanning the graphic code or querying the database.
The resource code transmission module is configured to send the resource code to the server side.
The main data query result receiving module is configured to receive a main data query result corresponding to the resource code from the server side, where the main data query result includes a resource attribute determined by the server side based on the prefix code, the first mapping relationship and the second mapping relationship in the resource code, or a resource attribute determined by the server side based on the prefix code, the second mapping relationship and a third mapping relationship in the resource code, and the third mapping relationship is a relationship between all values of the type bit and the version bit in the prefix code and the format of the comprehensive segment.
In some embodiments, the apparatus 1000 may further include: and a dialect type sending module.
The dialect type sending module is configured to send the dialect type to the server side before sending the resource code to the server side.
The main data query result receiving module is specifically configured to receive dialect main data query results corresponding to the resource codes and the dialect types from the server side.
In some embodiments, the apparatus 1000 may further include: the query word receiving module, the query word sending module and the query prefix code feedback module.
Wherein the query term receiving module is configured to receive the query term.
The query term sending module is configured to respond to the query terms and send the query terms to the server side.
The query prefix code feedback module is configured to receive a prefix code corresponding to the query word from the server side, wherein the prefix code is determined by the server side based on the query word, the first mapping relation and the second mapping relation, or the prefix code is determined by the server side based on the query word, the second mapping relation and the third mapping relation; the third mapping relationship is a relationship between all values of the type bit and the version bit in the prefix code and the format of the integrated segment.
Another aspect of the present application also provides a system for resource coding.
Fig. 11 is a block diagram schematically illustrating another system for resource encoding according to an embodiment of the present application.
Referring to fig. 11, the system for resource encoding may include: a server side and a client side.
Wherein the server side is configured to perform the method as shown in the relevant part of fig. 4.
A client configured to perform the method as shown in the relevant part of fig. 8.
In a specific embodiment, the server side may include an application interface and at least one of a user module, a type and format management module, a resource master data management module, a resource coding management module, a check code management module, and a dialect plug-in.
Wherein the user module is configured as Role-Based Access Control (RBAC). For example, the user authority is divided into four types, namely a format manager, a main data manager, a production person and a read-only user, at the server end, and the modules in the respective authorities are respectively managed.
The type and format management is configured to define several types and formats and configure a specific bit segment format in the integrated segment for each specific format. For example, 13-bit integrated segments are grouped, defining the field name, length, data type of each bit segment therein. The field name, length, and data type may refer to the above related contents, and are not described in detail herein.
The resource master data management module is configured to enter specific master data information and its corresponding bit segment encoding in response to a certain type of resource and format selected by a master data administrator according to the definition of the format field. These master data information may also be stored in a database for retrieval. Therefore, the unified management of the main data of the resources is realized, and the complete prefix code of one type of resources can be obtained every time one piece of main data is defined.
The resource encoding management module is configured to generate a resource encoding corresponding to the current prefix code and determine corresponding primary data information in response to the resource encoding. In addition, the resource encoding management module may be further configured to output a candidate prefix code or the like in response to the resource attribute.
The check code management module is configured to generate a check code for the prefix code and/or the serial code, and detect whether the obtained prefix code and/or the serial code is missing or broken based on the check code.
Dialect plug-ins are configured to find different dialect plug-ins based on the dialect type (e.g., dialect name) to convert the resource attributes to dialect resource attributes.
The application interface is configured to expose a web service to the outside by combining at least part of the plurality of modules to provide at least one function as follows: type format management, resource main data entry and query, resource code generation, resource code query and analysis and resource code check.
In one particular embodiment, the client may include a web front end, an encoding printing device, a code scanning device, and the like.
The web service is visually displayed on the client through a front-end interface by the client, so that a user can manage main data and resource codes of resources in a visual mode.
The code printing device is configured to search a corresponding complete prefix code in the server side through the web service according to the main data information, select resources required to be printed, call the web service to generate resource codes, and then call a printing interface of the printer to print the information, so that various resource codes such as bar codes, two-dimensional codes, character codes and the like can be obtained. Further, it is also possible to call an interface such as dialect conversion to obtain dialect data to be printed, and perform printing.
The code scanning device is configured to acquire data in the resource code so that the client inquires main data information corresponding to the data through a web service.
With respect to the apparatus 900, 1000 for resource coding in the above embodiments, the specific manner in which each module and unit performs operations has been described in detail in the embodiments related to the method, and will not be elaborated here.
Another aspect of the present application also provides an electronic device.
Fig. 12 schematically shows a block diagram of an electronic device implementing a method of resource encoding according to an embodiment of the present application.
Referring to fig. 12, the electronic device 1200 includes a memory 1210 and a processor 1220.
The Processor 1220 may be a Central Processing Unit (CPU), other general purpose Processor, a Digital Signal Processor (DSP), an Application Specific Integrated Circuit (ASIC), a Field Programmable Gate Array (FPGA) or other Programmable logic device, discrete Gate or transistor logic, discrete hardware components, etc. A general purpose processor may be a microprocessor or the processor may be any conventional processor or the like.
The memory 1210 may include various types of storage units, such as system memory, Read Only Memory (ROM), and permanent storage. Wherein the ROM may store static data or instructions for the processor 1220 or other modules of the computer. The persistent storage device may be a read-write storage device. The persistent storage may be a non-volatile storage device that does not lose stored instructions and data even after the computer is powered off. In some embodiments, the persistent storage device employs a mass storage device (e.g., magnetic or optical disk, flash memory) as the persistent storage device. In other embodiments, the permanent storage may be a removable storage device (e.g., floppy disk, optical drive). The system memory may be a read-write memory device or a volatile read-write memory device, such as a dynamic random access memory. The system memory may store instructions and data that some or all of the processors require at runtime. In addition, memory 1210 may include any combination of computer-readable storage media, including various types of semiconductor memory chips (e.g., DRAM, SRAM, SDRAM, flash memory, programmable read-only memory), magnetic and/or optical disks, as well. In some embodiments, memory 1210 may include a removable storage device that is readable and/or writable, such as a Compact Disc (CD), a digital versatile disc read only (e.g., DVD-ROM, dual layer DVD-ROM), a Blu-ray disc read only, an ultra-dense disc, a flash memory card (e.g., SD card, min SD card, Micro-SD card, etc.), a magnetic floppy disc, or the like. Computer-readable storage media do not contain carrier waves or transitory electronic signals transmitted by wireless or wired means.
The memory 1210 has stored thereon executable code that, when processed by the processor 1220, may cause the processor 1220 to perform some or all of the methods described above.
Furthermore, the method according to the present application may also be implemented as a computer program or computer program product comprising computer program code instructions for performing some or all of the steps of the above-described method of the present application.
Alternatively, the present application may also be embodied as a computer-readable storage medium (or non-transitory machine-readable storage medium or machine-readable storage medium) having executable code (or a computer program or computer instruction code) stored thereon, which, when executed by a processor of an electronic device (or server, etc.), causes the processor to perform part or all of the various steps of the above-described method according to the present application.
Having described embodiments of the present application, the foregoing description is intended to be exemplary, not exhaustive, and not limited to the disclosed embodiments. Many modifications and variations will be apparent to those of ordinary skill in the art without departing from the scope and spirit of the described embodiments. The terminology used herein is chosen in order to best explain the principles of the embodiments, the practical application, or improvements made to the technology in the marketplace, or to enable others of ordinary skill in the art to understand the embodiments disclosed herein.

Claims (18)

1. A method for resource encoding performed by a server, comprising:
receiving an encoding request from a client, wherein the encoding request comprises a prefix code;
responding to the prefix code, and determining a serial number corresponding to the prefix code;
combining the prefix code and the serial number to obtain a resource code so as to send the resource code to the client;
the prefix code comprises a type bit and a comprehensive section, a first mapping relation exists between the value of the type bit and the format of the comprehensive section, the format of the comprehensive section comprises at least one field, and a second mapping relation exists between the value of each field and the resource attribute.
2. The method of claim 1, wherein the prefix code further comprises a version bit, and wherein a third mapping relationship exists between all values of the type bit and the version bit and a format of the integrated segment.
3. The method of claim 2, further comprising:
receiving a main data query request from the client, wherein the main data query request comprises a prefix code to be queried;
in response to the prefix code to be queried, determining the format of a comprehensive segment corresponding to the value of the type bit in the prefix code to be queried based on the first mapping relation, or determining the format of a comprehensive segment corresponding to all values of the type bit and the version bit in the prefix code to be queried based on a third mapping relation;
determining resource attributes corresponding to the values of the fields of the integrated segment based on the second mapping relation;
determining a primary data query result corresponding to the primary data query request based on the resource attributes corresponding to the values of the fields of the integrated segment, so as to send the primary data query result to the client.
4. The method of claim 3, further comprising, after the determining resource attributes corresponding to values of fields of the integrated segment based on the second mapping relationship:
determining dialect information corresponding to the resource attribute based on a dialect type;
the determining a primary data query result corresponding to the primary data query request based on the resource attributes corresponding to the values of the fields of the integrated segment comprises: determining dialect primary data query results corresponding to the primary data query request based on dialect information corresponding to values of the fields of the integrated segment.
5. The method of claim 2, further comprising:
receiving a prefix code query request from the client, wherein the prefix code query request comprises query words;
determining the format of at least one integrated segment matched with the query word and the value of each field in the at least one integrated segment based on the second mapping relation in response to the query word;
determining a value of a type bit corresponding to a format of the at least one integrated segment based on the second mapping relationship or determining a value of a type bit and a version bit corresponding to a format of the at least one integrated segment based on the third mapping relationship;
for each composite segment format, a candidate prefix code is determined based on the value of the type bit and/or the value of the version bit and the values of the fields, and the candidate prefix code is sent to the client.
6. The method of claim 5, further comprising, after the determining the format of the at least one integrated segment matching the query term and the values of the fields in the at least one integrated segment based on the second mapping relationship:
sending the resource attribute corresponding to the value of each field of at least part of the at least one integrated section to the client;
receiving a format of a specified integrated segment from the client;
the determining a value of a type bit corresponding to a format of the at least one integrated segment based on the second mapping relationship or determining a value of a type bit and a version bit corresponding to a format of the at least one integrated segment based on the third mapping relationship includes:
determining a value of a type bit corresponding to a format of the designated integrated segment based on the second mapping relationship, or determining a value of a type bit and a version bit corresponding to a format of the designated integrated segment based on the third mapping relationship.
7. The method of any one of claims 1 to 6, wherein the format of the composite segment comprises M valid fields and N reserved fields, wherein the values of M + N are equal for different types of bits, and wherein M and N are integers greater than zero.
8. The method of any one of claims 1-6, wherein the determining, in response to the prefix code, a serial number corresponding to the prefix code comprises:
responding to the prefix code, and determining a serial number cursor corresponding to the prefix code;
and updating the historical serial number corresponding to the serial number cursor based on a preset rule to obtain the serial number.
9. The method according to any one of claims 1-6, further comprising, after the determining the serial number corresponding to the prefix code:
generating a check value for the prefix code and/or the serial number based on a check function;
the combining the prefix code and the serial number to obtain a resource code comprises:
generating the resource code based on the prefix code, the serial number, and the check value.
10. A method of resource encoding performed by a client, the method comprising:
generating an encoding request including the prefix code in response to the obtained prefix code;
sending the coding request to a server;
receiving and outputting a resource code from the server side, wherein the resource code comprises the prefix code and a serial number;
the prefix code comprises a type bit and a comprehensive section, a first mapping relation exists between the value of the type bit and the format of the comprehensive section, the format of the comprehensive section comprises at least one field, and a second mapping relation exists between the value of each field and the resource attribute.
11. The method of claim 10, further comprising:
obtaining a resource code by scanning the graphic code or querying a database;
sending the resource code to a server side;
receiving a main data query result corresponding to the resource code from the server, where the main data query result includes a resource attribute determined by the server based on the prefix code in the resource code, the first mapping relationship and the second mapping relationship, or a resource attribute determined by the server based on the prefix code in the resource code, the second mapping relationship and a third mapping relationship, and the third mapping relationship is a relationship between all values of the type bit and the version bit in the prefix code and the format of the comprehensive segment.
12. The method according to claim 11, further comprising, before said sending the resource code to the server side:
sending the dialect type to the server side;
the receiving of the main data query result corresponding to the resource code from the server side includes: and receiving dialect main data query results corresponding to the resource codes and the dialect types from the server side.
13. The method of claim 10, further comprising:
receiving a query term;
responding to the query word, and sending the query word to a server side;
receiving a prefix code corresponding to the query word from the server, wherein the prefix code is determined by the server based on the query word, the first mapping relation and the second mapping relation, or the prefix code is determined by the server based on the query word, the second mapping relation and a third mapping relation; the third mapping relationship is a relationship between all values of the type bit and the version bit in the prefix code and the format of the integrated segment.
14. The utility model provides a device of resource coding, sets up in the server side, its characterized in that includes:
an encoding request receiving module configured to receive an encoding request from a client, the encoding request including a prefix code;
a serial number determination module configured to determine a serial number corresponding to the prefix code in response to the prefix code;
the code combination module is configured to combine the prefix code and the serial number to obtain a resource code so as to send the resource code to the client; the prefix code comprises a type bit and a comprehensive section, a first mapping relation exists between the value of the type bit and the format of the comprehensive section, the format of the comprehensive section comprises at least one field, and a second mapping relation exists between the value of each field and the resource attribute.
15. An apparatus for resource coding, configured at a client, includes:
an encoding request generating module configured to generate an encoding request including the prefix code in response to the obtained prefix code;
the coding request sending module is configured to send the coding request to a server side;
a resource code receiving module configured to receive and output a resource code from the server, where the resource code includes the prefix code and serial number; the prefix code comprises a type bit and a comprehensive section, a first mapping relation exists between the value of the type bit and the format of the comprehensive section, the format of the comprehensive section comprises at least one field, and a second mapping relation exists between the value of each field and the resource attribute.
16. A system for resource encoding, comprising:
a server configured to perform the method according to any one of claims 1 to 9;
a client configured to perform the method of any of claims 10 to 13.
17. An electronic device, comprising:
a processor; and
a memory having executable code stored thereon, which when executed by the processor, causes the processor to perform the method of any of claims 1-13.
18. A computer-readable storage medium having stored thereon executable code, which when executed by a processor of an electronic device, causes the processor to perform the method of any one of claims 1-13.
CN202111553858.7A 2021-12-17 2021-12-17 Resource coding method, device, system and electronic equipment Pending CN114265864A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202111553858.7A CN114265864A (en) 2021-12-17 2021-12-17 Resource coding method, device, system and electronic equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202111553858.7A CN114265864A (en) 2021-12-17 2021-12-17 Resource coding method, device, system and electronic equipment

Publications (1)

Publication Number Publication Date
CN114265864A true CN114265864A (en) 2022-04-01

Family

ID=80827771

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202111553858.7A Pending CN114265864A (en) 2021-12-17 2021-12-17 Resource coding method, device, system and electronic equipment

Country Status (1)

Country Link
CN (1) CN114265864A (en)

Similar Documents

Publication Publication Date Title
EP2350848B1 (en) Sharing objects that rely on local resources with outside servers
CN101583952B (en) Integrating enterprise search systems with custom access control application programming interfaces
US7200806B2 (en) System and method for generating pre-populated forms
US8495007B2 (en) Systems and methods for hierarchical aggregation of multi-dimensional data sources
US8799229B2 (en) Searchable archive
US8260815B2 (en) System and method for accessing non-compatible content repositories
US8352516B2 (en) Multi-application object mapping tool
CN111274045B (en) Multi-platform docking method and device, computer equipment and readable storage medium
AU2014343044B2 (en) Method and system for document data extraction template management
CN111247550A (en) Computerized transaction management module for blockchain networks
US6687707B1 (en) Unique object identification in a network of computing systems
US11841852B2 (en) Tenant specific and global pretagging for natural language queries
CN115564356B (en) Real-time sharing method and device for parent-friend logistics order information
US7283994B2 (en) Merging of products into a database
CN114265864A (en) Resource coding method, device, system and electronic equipment
US8782015B2 (en) Systems and methods for processing data in a web services environment
WO2023108627A1 (en) Resource encoding method, apparatus, and system, and electronic device
US7636723B2 (en) Method and computer-readable medium for jointly managing digital assets and non-digital assets
US11367146B2 (en) Life insurance policy application process and system
US20030131071A1 (en) Electronic document interchange document object model
US20060184423A1 (en) Selecting Business Partners to Conduct Business-to-business (B2B) Transactions
US20020055963A1 (en) Data interchange system, data interchange instrument and method thereof
US11120399B2 (en) System and method for managing medical device inventory
US11372939B2 (en) Systems and methods for clustered inventory management
CN113205359B (en) Method and device for determining commodity price in bill and computer equipment

Legal Events

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