CN111160500B - Method and device for generating two-dimension code of contract, and method and device for acquiring contract - Google Patents

Method and device for generating two-dimension code of contract, and method and device for acquiring contract Download PDF

Info

Publication number
CN111160500B
CN111160500B CN201911342248.5A CN201911342248A CN111160500B CN 111160500 B CN111160500 B CN 111160500B CN 201911342248 A CN201911342248 A CN 201911342248A CN 111160500 B CN111160500 B CN 111160500B
Authority
CN
China
Prior art keywords
attribute name
contract
attribute
target contract
name
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.)
Active
Application number
CN201911342248.5A
Other languages
Chinese (zh)
Other versions
CN111160500A (en
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.)
Wanghai Kangxin Beijing Technology Co ltd
Original Assignee
Wanghai Kangxin Beijing 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 Wanghai Kangxin Beijing Technology Co ltd filed Critical Wanghai Kangxin Beijing Technology Co ltd
Priority to CN201911342248.5A priority Critical patent/CN111160500B/en
Publication of CN111160500A publication Critical patent/CN111160500A/en
Application granted granted Critical
Publication of CN111160500B publication Critical patent/CN111160500B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06KGRAPHICAL DATA READING; PRESENTATION OF DATA; RECORD CARRIERS; HANDLING RECORD CARRIERS
    • G06K19/00Record carriers for use with machines and with at least a part designed to carry digital markings
    • G06K19/06Record carriers for use with machines and with at least a part designed to carry digital markings characterised by the kind of the digital marking, e.g. shape, nature, code
    • G06K19/06009Record carriers for use with machines and with at least a part designed to carry digital markings characterised by the kind of the digital marking, e.g. shape, nature, code with optically detectable marking
    • G06K19/06037Record carriers for use with machines and with at least a part designed to carry digital markings characterised by the kind of the digital marking, e.g. shape, nature, code with optically detectable marking multi-dimensional coding
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06KGRAPHICAL DATA READING; PRESENTATION OF DATA; RECORD CARRIERS; HANDLING RECORD CARRIERS
    • G06K7/00Methods or arrangements for sensing record carriers, e.g. for reading patterns
    • G06K7/10Methods or arrangements for sensing record carriers, e.g. for reading patterns by electromagnetic radiation, e.g. optical sensing; by corpuscular radiation
    • G06K7/14Methods or arrangements for sensing record carriers, e.g. for reading patterns by electromagnetic radiation, e.g. optical sensing; by corpuscular radiation using light without selection of wavelength, e.g. sensing reflected white light
    • G06K7/1404Methods for optical code recognition
    • G06K7/1408Methods for optical code recognition the method being specifically adapted for the type of code
    • G06K7/14172D bar codes

Abstract

The invention provides a method and a device for generating a two-dimensional code of a contract, and a method, a device and a system for acquiring the contract, wherein the method is applied to a first device for generating the two-dimensional code of a target contract and comprises the following steps: pre-storing the target contract in a first database of the first device; acquiring at least one first attribute name of the target contract and an attribute value of each first attribute name from the first database; and generating a two-dimensional code of the target contract according to the at least one first attribute name and the attribute value of each first attribute name, so that a second device for acquiring the target contract acquires the target contract according to the two-dimensional code of the target contract. The invention provides a method and a device for generating a two-dimensional code of a contract, and a method, a device and a system for acquiring the contract, which can more conveniently find a target contract.

Description

Method and device for generating two-dimension code of contract, and method and device for acquiring contract
Technical Field
The invention relates to the technical field of computers, in particular to a method and a device for generating a two-dimensional code of a contract, and a method, a device and a system for acquiring the contract.
Background
A contract is an agreement between parties or between parties to set up, alter, and terminate civil relationships. For a company's system, hundreds or thousands of contracts may be saved. The system will typically encode english, numbers, or a combination of english and numbers as a contract. And searching the contract in the system, and only searching according to the contract code. Generally, the manner of encoding the contracts for different systems is different, and further, the encoding for different systems may be different for the same contract. The contract code of one system is transmitted to another system, and the system cannot find the corresponding contract according to the received contract code. For example, in system a, contract a has an encoding of XTA20190101567 and in system B, contract a has an encoding of 987090507XTB, and it is apparent that system a sends XTA20190101567 to system B, which cannot find contract a.
Disclosure of Invention
The embodiment of the invention provides a method and a device for generating a two-dimensional code of a contract, and a method, a device and a system for acquiring the contract, which can more conveniently find a target contract.
In a first aspect, an embodiment of the present invention provides a method for generating a two-dimensional code of a contract, which is applied to a first device for generating a two-dimensional code of a target contract, including:
Pre-storing the target contract in a first database of the first device;
acquiring at least one first attribute name of the target contract and an attribute value of each first attribute name from the first database;
and generating a two-dimensional code of the target contract according to the at least one first attribute name and the attribute value of each first attribute name, so that a second device for acquiring the target contract acquires the target contract according to the two-dimensional code of the target contract.
Alternatively, the process may be carried out in a single-stage,
the method further comprises the steps of:
determining a second attribute name of each first attribute name in the second device;
generating a dictionary according to each first attribute name and the second attribute name corresponding to each first attribute name, wherein the dictionary comprises: the corresponding relation between the first attribute name and the second attribute name;
and sending the dictionary to the second device so that the second device analyzes the two-dimensional code of the target contract according to the dictionary.
Alternatively, the process may be carried out in a single-stage,
the generating the two-dimensional code of the target contract according to the at least one first attribute name and the attribute value corresponding to each first attribute name includes:
For each of the first attribute names, performing: taking the current first attribute name and the attribute value of the current first attribute name as an array;
splicing the arrays corresponding to the at least one first attribute name into a character string, wherein separators are arranged between adjacent arrays in the character string;
and generating the two-dimensional code of the target contract according to the character string.
In a second aspect, an embodiment of the present invention provides a method for acquiring a contract, which is applied to a second device for acquiring a target contract, including:
pre-storing the target contract in a second database of the second device;
scanning a two-dimensional code of the target contract to obtain at least one first attribute name of the target contract and an attribute value of each first attribute name;
and inquiring the target contract from the second database according to the at least one first attribute name and the attribute value of each first attribute name.
Alternatively, the process may be carried out in a single-stage,
said querying said target contract from said second database based on said at least one first attribute name and an attribute value for each said first attribute name, comprising:
receiving a dictionary sent by a first device for generating the two-dimensional code of the target contract, wherein the dictionary comprises: a correspondence of the first attribute name and a second attribute name of the first attribute name in the second device;
For each of the first attribute names, performing: determining a current second attribute name corresponding to the current first attribute name according to the dictionary, and taking the attribute value of the current first attribute name as the attribute value of the current second attribute name;
and inquiring the target contract from the second database according to each second attribute name and the attribute value of each second attribute name.
Alternatively, the process may be carried out in a single-stage,
the scanning the two-dimensional code of the target contract, and obtaining at least one first attribute name of the target contract and an attribute value of each first attribute name, comprises the following steps:
scanning the two-dimensional code of the target contract to generate a character string to be analyzed;
determining separators in the character strings to be parsed;
taking the substring before the first separator in the character string to be analyzed as an array;
taking the substring after the last separator in the character string to be analyzed as an array;
taking the substring between any two adjacent separators in the character string to be analyzed as an array;
and determining the first attribute name and the attribute value of the first attribute name corresponding to each array from each array.
In a third aspect, an embodiment of the present invention provides an apparatus for generating an identifier of a contract, including:
a first contract saving unit for saving the target contract in a first database;
an attribute obtaining unit, configured to obtain at least one first attribute name of the target contract and an attribute value of each first attribute name from the first database;
and the two-dimension code generating unit is used for generating the two-dimension code of the target contract according to the at least one first attribute name and the attribute value of each first attribute name so that the second device for acquiring the target contract acquires the target contract according to the two-dimension code of the target contract.
Alternatively, the process may be carried out in a single-stage,
the apparatus further comprises:
a determining unit configured to determine a second attribute name of each of the first attribute names in the second device;
the dictionary generating unit is used for generating a dictionary according to each first attribute name and the second attribute name corresponding to each first attribute name, and the dictionary comprises the following components: the corresponding relation between the first attribute name and the second attribute name;
and the sending unit is used for sending the dictionary to the second device so that the second device analyzes the two-dimensional code of the target contract according to the dictionary.
Alternatively, the process may be carried out in a single-stage,
the two-dimensional code generating unit is used for executing:
for each of the first attribute names, performing: taking the current first attribute name and the attribute value of the current first attribute name as an array;
splicing the arrays corresponding to the at least one first attribute name into a character string, wherein separators are arranged between adjacent arrays in the character string;
and generating the two-dimensional code of the target contract according to the character string.
In a fourth aspect, an embodiment of the present invention provides an apparatus for acquiring a contract, including:
a second contract saving unit for saving the target contract in a second database;
the scanning unit is used for scanning the two-dimensional code of the target contract and acquiring at least one first attribute name of the target contract and an attribute value of each first attribute name;
and the inquiring unit is used for inquiring the target contract from the second database according to the at least one first attribute name and the attribute value of each first attribute name.
Alternatively, the process may be carried out in a single-stage,
the query unit is configured to perform:
receiving a dictionary sent by a first device for generating the two-dimensional code of the target contract, wherein the dictionary comprises: the corresponding relation between the first attribute name and the second attribute name of the first attribute name in the contract acquisition device;
For each of the first attribute names, performing: determining a current second attribute name corresponding to the current first attribute name according to the dictionary, and taking the attribute value of the current first attribute name as the attribute value of the current second attribute name;
and inquiring the target contract from the second database according to each second attribute name and the attribute value of each second attribute name.
Alternatively, the process may be carried out in a single-stage,
the scanning unit is configured to perform:
scanning the two-dimensional code of the target contract to generate a character string to be analyzed;
determining separators in the character strings to be parsed;
taking the substring before the first separator in the character string to be analyzed as an array;
taking the substring after the last separator in the character string to be analyzed as an array;
taking the substring between any two adjacent separators in the character string to be analyzed as an array;
and determining the first attribute name and the attribute value of the first attribute name corresponding to each array from each array.
In a fifth aspect, an embodiment of the present invention provides a system for acquiring a contract, including:
The apparatus for generating an identification of a contract according to any one of the third aspect, and the apparatus for acquiring a contract according to any one of the fourth aspect.
In the embodiment of the invention, the two-dimensional code of the target contract is generated according to the first attribute name and the attribute value of the target contract, and the second device needing to acquire the target contract can acquire the first attribute name and the attribute value of the target contract according to the two-dimensional code, so that the target contract can be more conveniently searched.
Drawings
In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings that are required in the embodiments or the description of the prior art will be briefly described, and it is obvious that the drawings in the following description are some embodiments of the present invention, and other drawings may be obtained according to these drawings without inventive effort for a person skilled in the art.
FIG. 1 is a flow chart of a method for generating a contractual two-dimensional code in accordance with an embodiment of the present invention;
FIG. 2 is a flow chart of a method for acquiring a contract according to an embodiment of the invention;
FIG. 3 is a flow chart of another method for acquiring contracts provided by an embodiment of the present invention;
FIG. 4 is a schematic diagram of an apparatus for generating an identification of a contract provided by an embodiment of the invention;
FIG. 5 is a schematic diagram of an apparatus for acquiring contracts according to an embodiment of the present invention;
fig. 6 is a schematic diagram of a system for acquiring contracts according to an embodiment of the present invention.
Detailed Description
For the purpose of making the objects, technical solutions and advantages of the embodiments of the present invention more apparent, the technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings in the embodiments of the present invention, and it is apparent that the described embodiments are some embodiments of the present invention, but not all embodiments, and all other embodiments obtained by those skilled in the art without making any inventive effort based on the embodiments of the present invention are within the scope of protection of the present invention.
As shown in fig. 1, an embodiment of the present invention provides a method for generating a two-dimensional code of a contract, which is applied to a first device for generating a two-dimensional code of a target contract, and includes:
step 101: pre-storing the target contract in a first database of the first device;
step 102: acquiring at least one first attribute name of the target contract and an attribute value of each first attribute name from the first database;
Step 103: and generating a two-dimensional code of the target contract according to the at least one first attribute name and the attribute value of each first attribute name, so that a second device for acquiring the target contract acquires the target contract according to the two-dimensional code of the target contract.
In the embodiment of the invention, the two-dimensional code of the target contract is generated according to the first attribute name and the attribute value of the target contract, and the second device needing to acquire the target contract can acquire the first attribute name and the attribute value of the target contract according to the two-dimensional code, so that the target contract can be more conveniently searched.
In the embodiment of the invention, the first device is provided with a first database, various contracts are stored in the first database, and the contents of the contracts can be stored under various fields, wherein the attribute names and the attribute values of the contracts are also stored. Specifically, the field in the first database may include a first attribute name, and the attribute value is stored in the field. For example: for the first attribute name, a "first party" field is set in the first database, and then a specific attribute value of each contract is saved in the "first party" field.
The first attribute name of the target contract may include: party a, party b, date of issuance, contractor, type of contract, amount of contract, payment means of the contract, keywords of the content of the contract, etc. Correspondingly, the attribute value of the first attribute name is specific data corresponding to each first attribute name in the target contract. Specifically, which first attribute names and corresponding attribute values are used to generate the two-dimensional code can be preconfigured.
For example, the attribute values of the first party are: the attribute values of Party B of xxx Corp are: the attribute value of the king xx and the signing date is as follows: the attribute values of the signer are as follows: the attribute values of the types of the contracts are as follows: renting the contract, wherein the attribute value of the limit of the contract is as follows: 10000 yuan, the attribute value of the payment mode of the contract is: the attribute values of the keywords of the contract content are: lease, xx cell, etc.
In the embodiment of the invention, the first database is arranged in the first device, the target contract is stored in the first database, namely, the target contract is stored in the local of the first device, and the second device is not allowed to access the first database in order to ensure the data security. The second device also stores the target contract, and the second device can acquire the target contract from the local of the second device through the two-dimension code of the target contract, so that only the two-dimension code of the contract is required to be transmitted in the network, the transmission of the contract in the network is avoided, and the safety of the contract is improved.
In one embodiment of the present invention, the method further comprises:
determining a second attribute name of each first attribute name in the second device;
generating a dictionary according to each first attribute name and the second attribute name corresponding to each first attribute name, wherein the dictionary comprises: the corresponding relation between the first attribute name and the second attribute name;
and sending the dictionary to the second device so that the second device analyzes the two-dimensional code of the target contract according to the dictionary.
Since the same data may be described differently in the first device and the second device, in particular, the same attribute value may be different in the first device and the second device with respect to the attribute names. For example, in the first device, the first attribute name is the amount of the contract, and in the second device, the amount of the contract is referred to as the amount of the contract, that is, the amount of the second attribute name is the amount of the contract, both of which are for transaction fees to which the contract relates, but the attribute names in the first device and the second device are different. In order to realize that the second device can accurately analyze the information of the contract contained in the two-dimensional code, a dictionary needs to be provided for the second device, wherein the dictionary comprises the corresponding relation between the first attribute name and the second attribute name, and through the dictionary, the second device can convert the first attribute name into the second attribute name in the second device, so that the second device can accurately determine the key information of the target contract, and further the second device can accurately find the target contract. For example, the first attribute name is the quota of the contract, the attribute value of the quota of the contract is 10000 yuan, and in the dictionary, the quota of the contract corresponds to the amount of the contract, and then the second device may parse out that the attribute value of the amount of the contract of the target contract is 10000 yuan.
In an embodiment of the present invention, the generating the two-dimensional code of the target contract according to the at least one first attribute name and the attribute value corresponding to each first attribute name includes:
for each of the first attribute names, performing: taking the current first attribute name and the attribute value of the current first attribute name as an array;
splicing the arrays corresponding to the at least one first attribute name into a character string, wherein separators are arranged between adjacent arrays in the character string;
and generating the two-dimensional code of the target contract according to the character string.
In the embodiment of the invention, a character string is generated according to the first attribute name and the attribute value, and then the character string is generated into the two-dimensional code, so that the second device can analyze the character string when scanning the two-dimensional code. The different arrays are separated in the character string by the separator, so that the second device can accurately determine each first attribute name and the attribute value thereof after analyzing the character string. The first attribute name may be separated from its attribute value by a colon in the string, in the following format: first attribute name: attribute values, for example: party a: xxx corporation.
For example, the first attribute name of the target contract includes: party A, party B and signing date, and the attribute values of party A are as follows: the attribute values of Party B of xxx Corp are: the attribute value of the king xx and the signing date is as follows: 9.2019.9.9. The array corresponding to the first party is: party a: the array corresponding to the Party B of xxx Corp is: and B, formula: the king xx and the corresponding array of signing dates are as follows: signing date: 9.2019.9.9. Then, the character string generated based on these arrays is "a side: xxx corporation, b: king xx, date of subscription: 9 months and 9 days 2019). The character string may be passed through the symbol "as a separator", and a symbol such as "≡"/"%" # ", etc. may be used as a separator.
As shown in fig. 2, the embodiment of the present invention provides a method for acquiring a contract, which is applied to a second device for acquiring a target contract, and may include the following steps:
step 201: pre-storing the target contract in a second database of the second device;
step 202: scanning a two-dimensional code of the target contract to obtain at least one first attribute name of the target contract and an attribute value of each first attribute name;
step 203: and inquiring the target contract from the second database according to the at least one first attribute name and the attribute value of each first attribute name.
In the embodiment of the invention, the target contract is stored in the second database in the second device, at least one first attribute name and the attribute value of the target contract can be analyzed by scanning the two-dimensional code of the target contract, and the target contract can be more conveniently searched in the second database based on the information analyzed from the two-dimensional code.
In the second device, a second database is provided, in which various contracts are stored, specifically, the contents of the contract may be stored under respective fields, wherein, of course, the attribute name and attribute value of the contract are also stored.
The second device queries the second database for contracts conforming to each first attribute name and attribute value thereof, and can find out the target contract.
In an embodiment of the present invention, the querying the target contract from the second database according to the at least one first attribute name and the attribute value of each first attribute name includes:
receiving a dictionary sent by a first device for generating the two-dimensional code of the target contract, wherein the dictionary comprises: a correspondence of the first attribute name and a second attribute name of the first attribute name in the second device;
For each of the first attribute names, performing: determining a current second attribute name corresponding to the current first attribute name according to the dictionary, and taking the attribute value of the current first attribute name as the attribute value of the current second attribute name;
and inquiring the target contract from the second database according to each second attribute name and the attribute value of each second attribute name.
In the embodiment of the invention, when the first device sends the dictionary, the first attribute name can be converted into the second attribute name in the second device based on the dictionary. And searching the contracts conforming to each second attribute name and the attribute value thereof from the second database based on each second attribute name and the attribute value thereof, so as to find the target contract.
The field in the second database of the second device may include a second attribute name, and the attribute value is stored in the field. For example: for this second attribute name of "first party", this field of "first party" is set in the second database, and then the specific attribute value of "first party" in each contract is saved in this field of "first party". Also for example: for the second attribute name of "amount of contract", a field of "amount of contract" is set in the second database, and then a specific attribute value of each contract with respect to "amount of contract" is saved in the field of "amount of contract".
For example, in the dictionary, the first attribute name of "the amount of contract" and the second attribute name of "the amount of contract", when the attribute value of "the amount of contract" of the target contract is 10000 yuan, it is determined based on the dictionary that the attribute value of "the amount of contract" of the target contract in the second device is 10000 yuan, and then the contract whose value is 10000 yuan is found from the field of "the amount of contract" in the second database, and the target contract is among these contracts. Then, the other second attribute names can be reused for further screening, and finally, the target contract can be determined.
In an embodiment of the present invention, the scanning the two-dimensional code of the target contract, to obtain at least one first attribute name of the target contract and an attribute value of each first attribute name, includes:
scanning the two-dimensional code of the target contract to generate a character string to be analyzed;
determining separators in the character strings to be parsed;
taking the substring before the first separator in the character string to be analyzed as an array;
taking the substring after the last separator in the character string to be analyzed as an array;
Taking the substring between any two adjacent separators in the character string to be analyzed as an array;
and determining the first attribute name and the attribute value of the first attribute name corresponding to each array from each array.
In the embodiment of the invention, after the second device scans the two-dimensional code, a character string to be analyzed is obtained, and then the first attribute name and the attribute value of the target contract need to be analyzed from the character string to be analyzed. The second device may agree on a separator with the first device, for example: the delimiter may be agreed upon with the first device as ","% ", or" # ".
After determining the separator, each array in the character string to be analyzed can be analyzed according to the separator.
For example, by scanning the two-dimensional code of the target contract, the character string to be analyzed is obtained as follows: "a side: xxx corporation, b: king xx, date of subscription: 9 months and 9 days 2019). Determined "," separator ", then the substring" a side "preceding the first separator: xxx company "as an array, signs the substring" after the last separator: as an array, the substring "b" between any two adjacent separators is: the king xx "acts as an array. Therefore, three arrays are resolved from the character string to be resolved, which are respectively: "a side: xxx company "," date of subscription: 9.9.9 and 9 "b: king xx).
After each array in the character string to be parsed is parsed, the first attribute name and the attribute value of the first attribute name in each array need to be identified. Specifically, the format of each array may be agreed with the first device, and then, at the time of parsing, parsing is performed according to the agreed array format. For example: the specific format of the array is as follows: first attribute name: attribute values. Then, the second device, when identifying each of the arrays, will ": "as the first attribute name before,": "the attribute value later as the first attribute name. Thus, the second device pair "party a: xxx corporation, b: king xx, date of subscription: after analysis of 2019, 9 and 9 days ", a first attribute name of the target contract is obtained, including: party A, party B and signing date, and the attribute values of party A are as follows: xxx corporation, attribute values for b: the attribute value of the king xx and the signing date is as follows: 9.2019.9.9.
As shown in fig. 3, a method for acquiring a contract according to an embodiment of the present invention will be described in detail with reference to a first device and a second device. The first device may be a device of company a, and the second device may be a device of company B, where company a needs to transmit the target contract to company B, and in order to ensure the security of the target contract, formula a simply sends the two-dimensional code of the target contract to company B, and the method specifically includes the following steps:
Step 301: the first device stores the target contract in a first database of the first device.
The following fields may be included in the first database: party a, party b, date of issuance, contractor, type of contract, amount of contract, payment means of the contract, etc. Each field is a first attribute name and the value of each field is the attribute value of the first attribute name.
In the first database, at least the following data is stored for the target contract: the value of the field "a-party" is: the value of field "b" is: the value of the king xx, field "date signed" is: the value of the field "quota of contract" at 9.2019, 9.9 is: 10000 yuan.
Step 302: the second device stores the target contract in a second database of the second device.
The following fields may be included in the second database: party a, party b, date of subscription, contractor, type of contract, amount of contract, payment means of the contract, and the like.
In the second database, at least the following data is stored for the target contract: the value of the field "a-party" is: the value of field "b" is: the value of the king xx, field "date signed" is: the value of the field "amount of contract" is: 10000 yuan.
Step 303: the first device obtains at least one first attribute name of the target contract and an attribute value of each first attribute name from a first database.
Specifically, the first device acquires the following information of the target contract from the first database: the value of the field "a-party" is: the value of field "b" is: the value of the king xx, field "date signed" is: the value of the field "quota of contract" at 9.2019, 9.9 is: 10000 yuan. Each field is a first attribute name of the target contract, and the value of each field is an attribute value of the first attribute name of the target contract. Specifically, at least one first attribute name of the target contract is obtained from the first database as follows: the attribute values of the first party, the second party, the signing date and the contract are as follows: the attribute values of "b" of xxx corporation are: the attribute value of the king xx, "date signed" is 9 months and 9 days in 2019, and the attribute value of the "limit of contract" is: 10000 yuan.
Step 304: the first device determines a second attribute name for each of the first attribute names in the second device.
Specifically, the first device determines that the first attribute name "first party" is the second attribute name "first party" of the second device; the first device determines that the first attribute name 'b' is the second attribute name 'b' of the second device; the first device determines that the first attribute name of the "signing date" is the second attribute name of the second device of the "signing date"; the first device determines that the first attribute name "the amount of the contract" is "the amount of the contract" at the second attribute name of the second device.
Step 305: the first device generates a dictionary according to each first attribute name and a second attribute name corresponding to each first attribute name, wherein the dictionary comprises: correspondence between the first attribute name and the second attribute name.
Specifically, the dictionary china may include only a case where the first attribute name and the second attribute name are different, and if the first attribute name and the second attribute name are the same, no setting in the dictionary is required.
For example: in the dictionary, a first attribute name "date of signing" corresponds to a second attribute name "date of signing", and a first attribute name "amount of contract" corresponds to a second attribute name "amount of contract".
Step 306: the first device sends the dictionary to the second device.
Specifically, the first device may send the dictionary to the second device over the public network.
Step 307: the first apparatus performs, for each first attribute name: and taking the current first attribute name and the attribute value of the current first attribute name as an array.
Specifically, the first device uses "party a" and "xxx company" as an array, uses "party b" and "king xx" as an array, uses "date of signing" and "9/2019" as an array, and uses "contract amount" and "10000 yuan" as an array.
Step 308: the first device splices the array corresponding to the at least one first attribute name into a character string, generates a two-dimensional code of the target contract according to the character string, and sends the two-dimensional code of the target contract to the second device, wherein separators are arranged between adjacent arrays in the character string.
Specifically, in the character string, the presentation format of each array is: first attribute name: attribute values. By comma "," as separator.
The character string of the generated target contract is: "a side: xxx corporation, b: king xx, date of subscription: the limit of the contract at 9.2019, 9.9: 10000 yuan).
Step 309: the second device receives the dictionary and the two-dimensional code of the target contract sent by the first device.
Step 310: the second device scans the two-dimensional code of the target contract, generates a character string, determines separators in the character string, takes a substring before the first separator in the character string as an array, takes a substring after the last separator in the character string as an array, and takes a substring between any two adjacent separators in the character string as an array.
Specifically, the second device parses four arrays from the character string, where the four arrays are: "a side: xxx corporation "," b: king xx "," date of subscription: 9.2019, 9 th month "," limit of contract: 10000 yuan).
Step 311: the second device determines a first attribute name and an attribute value of the first attribute name corresponding to each array from each array.
Specifically, the second device determines from the four arrays: the attribute value of the first attribute name "a-party" is: the attribute value of the first attribute name "b" of xxx corporation is: the attribute value of the king xx, the first attribute name "date signed" is: the attribute value of the first attribute name "the quota of contract" on 9 months and 9 days 2019 is: 10000 yuan.
Step 312: the second apparatus performs, for each first attribute name: and determining a current second attribute name corresponding to the current first attribute name according to the dictionary, and taking the attribute value of the current first attribute name as the attribute value of the current second attribute name.
Specifically, since the second attribute name of the first attribute name "a party" in the second device is also "a party", and the second attribute name of the first attribute name "b party" in the second device is also "b party", without change, then it can be directly determined that: the attribute value of the second attribute name "a-party" is: the attribute value of the second attribute name "b" is: king xx.
The second attribute name corresponding to the first attribute name "signing date" may be determined as "signing date" according to the dictionary, and the second attribute name corresponding to the first attribute name "credit of contract" may be determined as "amount of contract". The attribute value of the second attribute name "date signed up" is: the attribute value of the second attribute name "the amount of contract" at 9.2019 and 9 is: 10000 yuan.
Step 313: the second means queries the second database for the target contract based on each second attribute name and the attribute value of each second attribute name.
Specifically, the second device queries a contract with the value of the field "xxx company" from the field "first party" of the second database, queries a contract with the value of the field "king xx" from the field "second party" of the second database, queries a contract with the value of the field "2019, 9 and 9 days" from the field "signing date" of the second database, queries a contract with the value of the field "10000 yuan" from the amount "of the field" contract "of the second database, and determines a contract with the value of the four fields identical to the attribute value in the two-dimensional code, wherein the contract is the target contract.
As shown in fig. 4, an embodiment of the present invention provides an apparatus for generating an identification of a contract, including:
A first contract holding unit 401 for holding a target contract in a first database;
an attribute obtaining unit 402, configured to obtain, from the first database, at least one first attribute name of the target contract and an attribute value of each of the first attribute names;
a two-dimension code generating unit 403, configured to generate a two-dimension code of the target contract according to the at least one first attribute name and an attribute value of each first attribute name, so that a second device that obtains the target contract according to the two-dimension code of the target contract.
In one embodiment of the present invention, the apparatus further comprises:
a determining unit configured to determine a second attribute name of each of the first attribute names in the second device;
the dictionary generating unit is used for generating a dictionary according to each first attribute name and the second attribute name corresponding to each first attribute name, and the dictionary comprises the following components: the corresponding relation between the first attribute name and the second attribute name;
and the sending unit is used for sending the dictionary to the second device so that the second device analyzes the two-dimensional code of the target contract according to the dictionary.
In an embodiment of the present invention, the two-dimensional code generating unit is configured to perform:
for each of the first attribute names, performing: taking the current first attribute name and the attribute value of the current first attribute name as an array;
splicing the arrays corresponding to the at least one first attribute name into a character string, wherein separators are arranged between adjacent arrays in the character string;
and generating the two-dimensional code of the target contract according to the character string.
As shown in fig. 5, an embodiment of the present invention provides an apparatus for acquiring a contract, including:
a second contract saving unit 501 for saving the target contract in a second database;
the scanning unit 502 is configured to scan the two-dimensional code of the target contract, and obtain at least one first attribute name of the target contract and an attribute value of each first attribute name;
a query unit 503, configured to query the target contract from the second database according to the at least one first attribute name and the attribute value of each first attribute name.
In an embodiment of the invention, the query unit is configured to perform:
receiving a dictionary sent by a first device for generating the two-dimensional code of the target contract, wherein the dictionary comprises: the corresponding relation between the first attribute name and the second attribute name of the first attribute name in the contract acquisition device;
For each of the first attribute names, performing: determining a current second attribute name corresponding to the current first attribute name according to the dictionary, and taking the attribute value of the current first attribute name as the attribute value of the current second attribute name;
and inquiring the target contract from the second database according to each second attribute name and the attribute value of each second attribute name.
In an embodiment of the present invention, the scanning unit is configured to perform:
scanning the two-dimensional code of the target contract to generate a character string to be analyzed;
determining separators in the character strings to be parsed;
taking the substring before the first separator in the character string to be analyzed as an array;
taking the substring after the last separator in the character string to be analyzed as an array;
taking the substring between any two adjacent separators in the character string to be analyzed as an array;
and determining the first attribute name and the attribute value of the first attribute name corresponding to each array from each array.
As shown in fig. 6, an embodiment of the present invention provides a system for acquiring a contract, including:
The device 601 for generating the identifier of the contract provided by the embodiment of the invention, and the device 602 for acquiring the contract provided by the embodiment of the invention.
It will be appreciated that the structure illustrated by embodiments of the present invention does not constitute a specific limitation on the means by which the identification of the contract is generated. In other embodiments of the invention, the means for generating an identification of the contract may include more or less components than illustrated, or certain components may be combined, or certain components may be split, or different arrangements of components. The illustrated components may be implemented in hardware, software, or a combination of software and hardware.
It will be appreciated that the configuration illustrated in the embodiments of the present invention does not constitute a specific limitation on the means by which the contract is acquired. In other embodiments of the invention, the means for acquiring a contract may include more or less components than illustrated, or certain components may be combined, or certain components may be split, or different arrangements of components. The illustrated components may be implemented in hardware, software, or a combination of software and hardware.
The content of information interaction and execution process between the units in the device is based on the same conception as the embodiment of the method of the present invention, and specific content can be referred to the description in the embodiment of the method of the present invention, which is not repeated here.
The present invention also provides a computer-readable medium storing instructions for causing a computer to perform a method of generating a contract two-dimensional code as described herein. Specifically, a system or apparatus provided with a storage medium on which a software program code realizing the functions of any of the above embodiments is stored, and a computer (or CPU or MPU) of the system or apparatus may be caused to read out and execute the program code stored in the storage medium.
The present invention also provides a computer readable medium storing instructions for causing a computer to perform a method of acquiring a contract as described herein. Specifically, a system or apparatus provided with a storage medium on which a software program code realizing the functions of any of the above embodiments is stored, and a computer (or CPU or MPU) of the system or apparatus may be caused to read out and execute the program code stored in the storage medium.
In this case, the program code itself read from the storage medium may realize the functions of any of the above-described embodiments, and thus the program code and the storage medium storing the program code form part of the present invention.
Examples of the storage medium for providing the program code include a floppy disk, a hard disk, a magneto-optical disk, an optical disk (e.g., CD-ROM, CD-R, CD-RW, DVD-ROM, DVD-RAM, DVD-RW, DVD+RW), a magnetic tape, a nonvolatile memory card, and a ROM. Alternatively, the program code may be downloaded from a server computer by a communication network.
Further, it should be apparent that the functions of any of the above-described embodiments may be implemented not only by executing the program code read out by the computer, but also by causing an operating system or the like operating on the computer to perform part or all of the actual operations based on the instructions of the program code.
Further, it is understood that the program code read out by the storage medium is written into a memory provided in an expansion board inserted into a computer or into a memory provided in an expansion unit connected to the computer, and then a CPU or the like mounted on the expansion board or the expansion unit is caused to perform part and all of actual operations based on instructions of the program code, thereby realizing the functions of any of the above embodiments.
It should be noted that not all the steps and modules in the above flowcharts and the system configuration diagrams are necessary, and some steps or modules may be omitted according to actual needs. The execution sequence of the steps is not fixed and can be adjusted as required. The system structure described in the above embodiments may be a physical structure or a logical structure, that is, some modules may be implemented by the same physical entity, or some modules may be implemented by multiple physical entities, or may be implemented jointly by some components in multiple independent devices.
In the above embodiments, the hardware unit may be mechanically or electrically implemented. For example, a hardware unit may include permanently dedicated circuitry or logic (e.g., a dedicated processor, FPGA, or ASIC) to perform the corresponding operations. The hardware unit may also include programmable logic or circuitry (e.g., a general-purpose processor or other programmable processor) that may be temporarily configured by software to perform the corresponding operations. The particular implementation (mechanical, or dedicated permanent, or temporarily set) may be determined based on cost and time considerations.
While the invention has been illustrated and described in detail in the drawings and in the preferred embodiments, the invention is not limited to the disclosed embodiments, and it will be appreciated by those skilled in the art that the code audits of the various embodiments described above may be combined to produce further embodiments of the invention, which are also within the scope of the invention.

Claims (9)

1. A method of acquiring a contract, characterized by being applied to a first device that generates a two-dimensional code of a target contract, the target contract being stored in advance in a first database of the first device and the target contract being stored in advance in a second device, comprising:
Acquiring at least one first attribute name of the target contract and an attribute value of each first attribute name from the first database; wherein the first attribute comprises: party A, party B, date of signing, person signing, type of contract, amount of contract, payment mode of contract;
generating a two-dimensional code of the target contract according to the at least one first attribute name and the attribute value of each first attribute name;
the two-dimension code of the target contract is sent to a second device, so that the second device which stores the target contract obtains the target contract from the local of the second device according to the two-dimension code of the target contract;
the generating the two-dimensional code of the target contract according to the at least one first attribute name and the attribute value corresponding to each first attribute name includes:
for each of the first attribute names, performing: taking the current first attribute name and the attribute value of the current first attribute name as an array;
splicing the arrays corresponding to the at least one first attribute name into a character string, wherein separators are arranged between adjacent arrays in the character string;
And generating the two-dimensional code of the target contract according to the character string.
2. The method of claim 1, wherein the step of determining the position of the substrate comprises,
further comprises:
determining a second attribute name of each first attribute name in the second device;
generating a dictionary according to each first attribute name and the second attribute name corresponding to each first attribute name, wherein the dictionary comprises: the corresponding relation between the first attribute name and the second attribute name;
and sending the dictionary to the second device so that the second device analyzes the two-dimensional code of the target contract according to the dictionary.
3. A method for acquiring a contract, applied to a second device for acquiring a target contract, wherein the target contract is stored in a second database of the second device in advance, comprising:
receiving a two-dimensional code of the target contract sent by a first device;
scanning a two-dimensional code of the target contract to obtain at least one first attribute name of the target contract and an attribute value of each first attribute name; wherein the first attribute comprises: party A, party B, date of signing, person signing, type of contract, amount of contract, payment mode of contract;
Querying the target contract from the second database according to the at least one first attribute name and the attribute value of each first attribute name;
the scanning the two-dimensional code of the target contract, and obtaining at least one first attribute name of the target contract and an attribute value of each first attribute name, includes:
scanning the two-dimensional code of the target contract to generate a character string to be analyzed;
determining separators in the character strings to be parsed;
taking the substring before the first separator in the character string to be analyzed as an array;
taking the substring after the last separator in the character string to be analyzed as an array;
taking the substring between any two adjacent separators in the character string to be analyzed as an array;
and determining the first attribute name and the attribute value of the first attribute name corresponding to each array from each array.
4. The method of claim 3, wherein the step of,
said querying said target contract from said second database based on said at least one first attribute name and an attribute value for each said first attribute name, comprising:
Receiving a dictionary sent by a first device for generating the two-dimensional code of the target contract, wherein the dictionary comprises: a correspondence of the first attribute name and a second attribute name of the first attribute name in the second device;
for each of the first attribute names, performing: determining a current second attribute name corresponding to the current first attribute name according to the dictionary, and taking the attribute value of the current first attribute name as the attribute value of the current second attribute name;
and inquiring the target contract from the second database according to each second attribute name and the attribute value of each second attribute name.
5. An apparatus for acquiring a contract, comprising:
a first contract saving unit for saving the target contract in a first database;
an attribute obtaining unit, configured to obtain at least one first attribute name of the target contract and an attribute value of each first attribute name from the first database; wherein the first attribute comprises: party A, party B, date of signing, person signing, type of contract, amount of contract, payment mode of contract;
The two-dimension code generating unit is used for generating a two-dimension code of the target contract according to the at least one first attribute name and the attribute value of each first attribute name, and sending the two-dimension code of the target contract to a second device; the second device which stores the target contract obtains the target contract from the local of the second device according to the two-dimension code of the target contract;
the two-dimensional code generating unit is used for executing:
for each of the first attribute names, performing: taking the current first attribute name and the attribute value of the current first attribute name as an array;
splicing the arrays corresponding to the at least one first attribute name into a character string, wherein separators are arranged between adjacent arrays in the character string;
and generating the two-dimensional code of the target contract according to the character string.
6. The apparatus of claim 5, wherein the device comprises a plurality of sensors,
further comprises:
a determining unit configured to determine a second attribute name of each of the first attribute names in the second device;
the dictionary generating unit is used for generating a dictionary according to each first attribute name and the second attribute name corresponding to each first attribute name, and the dictionary comprises the following components: the corresponding relation between the first attribute name and the second attribute name;
And the sending unit is used for sending the dictionary to the second device so that the second device analyzes the two-dimensional code of the target contract according to the dictionary.
7. An apparatus for acquiring a contract, comprising:
a second contract saving unit for saving the target contract in a second database;
the scanning unit is used for scanning the two-dimensional code of the target contract sent by the first device and acquiring at least one first attribute name of the target contract and an attribute value of each first attribute name; wherein the first attribute comprises: party A, party B, date of signing, person signing, type of contract, amount of contract, payment mode of contract;
a query unit, configured to query the target contract from the second database according to the at least one first attribute name and an attribute value of each first attribute name;
the scanning unit is configured to perform:
scanning the two-dimensional code of the target contract to generate a character string to be analyzed;
determining separators in the character strings to be parsed;
taking the substring before the first separator in the character string to be analyzed as an array;
Taking the substring after the last separator in the character string to be analyzed as an array;
taking the substring between any two adjacent separators in the character string to be analyzed as an array;
and determining the first attribute name and the attribute value of the first attribute name corresponding to each array from each array.
8. The apparatus of claim 7, wherein the device comprises a plurality of sensors,
the query unit is configured to perform:
receiving a dictionary sent by a first device for generating the two-dimensional code of the target contract, wherein the dictionary comprises: the corresponding relation between the first attribute name and the second attribute name of the first attribute name in the contract acquisition device;
for each of the first attribute names, performing: determining a current second attribute name corresponding to the current first attribute name according to the dictionary, and taking the attribute value of the current first attribute name as the attribute value of the current second attribute name;
and inquiring the target contract from the second database according to each second attribute name and the attribute value of each second attribute name.
9. A system for acquiring contracts, comprising:
The contract acquiring apparatus according to claim 5 or 6, and the contract acquiring apparatus according to claim 7 or 8.
CN201911342248.5A 2019-12-23 2019-12-23 Method and device for generating two-dimension code of contract, and method and device for acquiring contract Active CN111160500B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201911342248.5A CN111160500B (en) 2019-12-23 2019-12-23 Method and device for generating two-dimension code of contract, and method and device for acquiring contract

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201911342248.5A CN111160500B (en) 2019-12-23 2019-12-23 Method and device for generating two-dimension code of contract, and method and device for acquiring contract

Publications (2)

Publication Number Publication Date
CN111160500A CN111160500A (en) 2020-05-15
CN111160500B true CN111160500B (en) 2023-10-20

Family

ID=70558188

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201911342248.5A Active CN111160500B (en) 2019-12-23 2019-12-23 Method and device for generating two-dimension code of contract, and method and device for acquiring contract

Country Status (1)

Country Link
CN (1) CN111160500B (en)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111179099B (en) * 2019-12-02 2023-06-27 泰康保险集团股份有限公司 Method, device, medium and electronic equipment for acquiring insurance contract
CN114037039A (en) * 2021-11-09 2022-02-11 广州瀚鼎信息科技有限公司 Novel setting code generation method, decoding board attribute setting method and system

Citations (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
SU1328817A1 (en) * 1983-01-25 1987-08-07 Ленинградский государственный педагогический институт им.А.И.Герцена Apparatus for monitoring text information
JP2002109039A (en) * 2000-09-26 2002-04-12 Pro-Tect Co Ltd Constitution method for card system utilizing portable telephone and card system
JP2005165795A (en) * 2003-12-04 2005-06-23 Keiichi Kato Document management system
JP2005215951A (en) * 2004-01-29 2005-08-11 Kddi Corp Encoding or decoding method for document data, and program therefor
EP2040178A2 (en) * 2007-09-20 2009-03-25 Canon Kabushiki Kaisha Document encoding apparatus, document encoding method, and computer-readable storage medium
JP2009093631A (en) * 2007-09-20 2009-04-30 Canon Inc Document-encoding apparatus and document-encoding method
CN102103627A (en) * 2010-11-26 2011-06-22 中兴通讯股份有限公司 Method and device for identifying two-dimensional codes on mobile terminal
CN107025460A (en) * 2016-08-17 2017-08-08 广州市力融计算机技术有限公司 The system and method for improving contract management level and efficiency
CN107357887A (en) * 2017-07-10 2017-11-17 唐郡 The generation method of report of tracing to the source based on Quick Response Code
CN108876299A (en) * 2018-06-15 2018-11-23 中金金融认证中心有限公司 A kind of method and device handling electronic contract

Patent Citations (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
SU1328817A1 (en) * 1983-01-25 1987-08-07 Ленинградский государственный педагогический институт им.А.И.Герцена Apparatus for monitoring text information
JP2002109039A (en) * 2000-09-26 2002-04-12 Pro-Tect Co Ltd Constitution method for card system utilizing portable telephone and card system
JP2005165795A (en) * 2003-12-04 2005-06-23 Keiichi Kato Document management system
JP2005215951A (en) * 2004-01-29 2005-08-11 Kddi Corp Encoding or decoding method for document data, and program therefor
EP2040178A2 (en) * 2007-09-20 2009-03-25 Canon Kabushiki Kaisha Document encoding apparatus, document encoding method, and computer-readable storage medium
JP2009093631A (en) * 2007-09-20 2009-04-30 Canon Inc Document-encoding apparatus and document-encoding method
CN102103627A (en) * 2010-11-26 2011-06-22 中兴通讯股份有限公司 Method and device for identifying two-dimensional codes on mobile terminal
CN107025460A (en) * 2016-08-17 2017-08-08 广州市力融计算机技术有限公司 The system and method for improving contract management level and efficiency
CN107357887A (en) * 2017-07-10 2017-11-17 唐郡 The generation method of report of tracing to the source based on Quick Response Code
CN108876299A (en) * 2018-06-15 2018-11-23 中金金融认证中心有限公司 A kind of method and device handling electronic contract

Also Published As

Publication number Publication date
CN111160500A (en) 2020-05-15

Similar Documents

Publication Publication Date Title
US8781172B2 (en) Methods and systems for enhancing the performance of automated license plate recognition applications utilizing multiple results
CN111160500B (en) Method and device for generating two-dimension code of contract, and method and device for acquiring contract
CN111683066B (en) Heterogeneous system integration method, heterogeneous system integration device, computer equipment and storage medium
CN109388417B (en) Communication protocol updating method, system and terminal equipment
CN111327679A (en) Rule analysis method and device
CN104579909A (en) Method and equipment for classifying user information and acquiring user grouping information
CN109815112B (en) Data debugging method and device based on functional test and terminal equipment
CN112070608B (en) Information processing method, device, medium and electronic equipment
US11263569B2 (en) Blockchain-based information processing method and apparatus, and device
CN109165209B (en) Data verification method, device, equipment and medium for object types in database
CN114328566A (en) Relationship graph updating method, device, medium, equipment and generating method
CN110233821A (en) A kind of detection of smart machine cyberspace and security scanning systems and its method
CN111224981B (en) Data processing method and device, electronic equipment and storage medium
CN113129008A (en) Data processing method and device, computer readable medium and electronic equipment
KR20120003567A (en) Log management system, log processing method of the same of and recording medium storing the log processing method of the same of
CN116993523A (en) Configurable account checking method, device, equipment and storage medium
CN111324645B (en) Block chain data processing method and device
CN116186286A (en) International logistics information recommendation method, system and medium based on enterprise knowledge graph
CN113468446B (en) Method, system and equipment for supporting identification of third party two-dimensional code data
CN111695031A (en) Label-based searching method, device, server and storage medium
CN107707328B (en) Abstract information transmission method and device
CN114371866A (en) Version reconfiguration test method, device and equipment of service system
CN111198850A (en) Log message processing method and device and Internet of things platform
CN113138999B (en) Data processing method and device, computer storage medium and electronic equipment
CN113282662B (en) Block information processing method, device, equipment and medium

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
CB02 Change of applicant information
CB02 Change of applicant information

Address after: 100176 room 801-2, 8th floor, building 3, yard 22, Ronghua Middle Road, Beijing Economic and Technological Development Zone, Daxing District, Beijing

Applicant after: Wanghai Kangxin (Beijing) Technology Co.,Ltd.

Address before: Room 07, zone 2, building B, No. 12, Hongda North Road, Beijing Economic and Technological Development Zone, Beijing 100176

Applicant before: Wanghai Kangxin (Beijing) Technology Co.,Ltd.

GR01 Patent grant
GR01 Patent grant