CN118113629A - Equipment configuration method and device - Google Patents

Equipment configuration method and device Download PDF

Info

Publication number
CN118113629A
CN118113629A CN202410215076.XA CN202410215076A CN118113629A CN 118113629 A CN118113629 A CN 118113629A CN 202410215076 A CN202410215076 A CN 202410215076A CN 118113629 A CN118113629 A CN 118113629A
Authority
CN
China
Prior art keywords
target
field
native
identification
configuration item
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
CN202410215076.XA
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.)
Hangzhou Hikrobot Co Ltd
Original Assignee
Hangzhou Hikrobot 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 Hangzhou Hikrobot Co Ltd filed Critical Hangzhou Hikrobot Co Ltd
Priority to CN202410215076.XA priority Critical patent/CN118113629A/en
Publication of CN118113629A publication Critical patent/CN118113629A/en
Pending legal-status Critical Current

Links

Landscapes

  • Selective Calling Equipment (AREA)

Abstract

The embodiment of the application provides a device configuration method and a device, wherein a target device maintains a native correspondence in advance, so that an identification correspondence between each configuration item and each native identification and an address correspondence between each native identification and a memory address can be established in advance, after a native identification field obtained by analyzing a target setting code is scanned in a subsequent scanning manner, the memory address corresponding to the native identification can be located, and finally, information stored in the memory address can be processed. Because the original corresponding relation in the multiplexing target equipment is adopted, the protocol does not need to be modified, and the equipment configuration efficiency can be improved.

Description

Equipment configuration method and device
Technical Field
The present application relates to the field of computer vision, and in particular, to a device configuration method and apparatus.
Background
In the field of device configuration, when configuring some devices with a code reading camera, a user can configure functions of the devices by connecting the code reading camera through a client. And then, interaction is carried out with the camera through command communication of a setting code, a serial port or a network, so that function setting is completed. However, in this setting scheme, a protocol needs to be agreed, and each time the content of the configuration item is newly added or the content of the configuration item needs to be modified, the protocol needs to be modified again, which may cause inefficiency in configuration of the code reading camera.
Therefore, a device configuration method is needed to solve the problem of inefficiency of configuration.
Disclosure of Invention
An object of an embodiment of the present application is to provide a device configuration method and apparatus, which are used to solve the problem of low efficiency of configuration of a code reading camera. The specific technical scheme is as follows:
In a first aspect of the present application, there is provided a device configuration method applied to a master device, the method including:
In response to a configuration operation aiming at target equipment, identifying each target configuration item aimed at by the configuration operation, wherein the target equipment maintains a native correspondence in advance, an identification correspondence between each configuration item and each native identification is established in advance, and an address correspondence between each native identification and a memory address is established in advance, and the native identification is an identification used in the native correspondence of the target equipment;
for each target configuration item, determining a native identifier corresponding to the target configuration item based on the identifier correspondence, and taking the native identifier as a target native identifier corresponding to the target configuration item;
Generating a native identification field for representing a target native identification corresponding to the target configuration item as a native identification field corresponding to the target configuration item for each target configuration item;
And displaying a setting code used for representing each of the native identification fields, so that the target equipment scans and analyzes the setting code to obtain each native identification field, determining a memory address corresponding to the target native identification represented by the native identification field based on the identification correspondence for each native identification field, and processing information stored in the memory address.
In one possible implementation, the method further includes:
Identifying the processing mode of the configuration operation aiming at each target configuration item;
generating an operation field for recording the processing mode of each target configuration item as the operation field of the target configuration item;
the presentation is used for representing the setting code of each native identification field, and comprises:
And displaying a setting code used for representing each native identification field, each operation field and a first corresponding relation between each operation field and the native identification field, so that the target equipment scans and analyzes the setting code to obtain each native identification field, each operation field and the first corresponding relation, determining a memory address corresponding to a target native identification represented by the native identification field based on the identification corresponding relation for each native identification field, and processing information stored in the memory address.
In one possible implementation, the method further includes:
identifying the type of the processing mode of the configuration operation aiming at each target configuration item;
Generating a type field for recording the type of the processing mode of each target configuration item as the type field of the target configuration item;
the presentation is used for representing the setting code of each native identification field, and comprises:
Displaying a setting code used for representing each native identification field, each type field and a second corresponding relation between each type field and the native identification field, so that the target device scans and analyzes the setting code to obtain each native identification field, each type field and the second corresponding relation, determining a type field corresponding to the native identification field according to the second corresponding relation for each native identification field, determining a memory address corresponding to a target native identification represented by the native identification field based on the identification corresponding relation, and processing information stored in the memory address according to a processing mode corresponding to the type field.
In one possible implementation, the method further includes:
for each type, counting the number of target configuration items of the type, which are the corresponding number of the type, by the processing mode;
For each type, generating a number field for representing the number corresponding to the type as the number field corresponding to the type;
The presentation is configured to represent each of the native identification fields, each of the type fields, and a setting code of a second correspondence between each of the type fields and the native identification fields, and includes:
Displaying a setting code for representing at least one configuration field; each configuration field corresponds to a type, and each configuration field comprises a type field of the type corresponding to the configuration field, a number field corresponding to the type, and a native identification field of a target configuration item of the type, wherein the number field corresponding to the type is consecutive to the native identification field of the target configuration item of the type, and the configuration field is used for representing a second correspondence between the type field and the native identification field.
In one possible implementation, the method further includes:
identifying a processing mode of the configuration operation aiming at a target configuration item of a preset type;
Generating an operation field for recording a processing mode of each target configuration item aiming at each target configuration item of a preset type, wherein the operation field is used as the operation field of the target configuration item;
if the type corresponding to the configuration field belongs to a preset type, the configuration field further includes: the operation field of the target configuration item of the type is further used for representing a first corresponding relation between the operation field and the native identification field of the target configuration item of the type.
In one possible implementation manner, the generating, for each target configuration item, an operation field for recording a processing manner of the target configuration item includes:
If the processing mode is that the character string is set, an operation field composed of an identifier and an ASCII code of the character string is generated and used as the operation field of the target configuration item.
In one possible implementation, the configuration fields are partitioned by a first separator; configuring a first bit of a field as a type field, a second bit to a fourth bit as a number field, and a fifth bit to a thirteenth bit as a primary identification field, wherein if the number corresponding to the number field is greater than 1, the primary identification fields are separated by a second separator; if the type of the target configuration item corresponding to the configuration field is a preset type, the fourteenth bit and the operation field of the target configuration item after the fourteenth bit are the preset type, wherein the preset type comprises a setting type; the operation field is a configuration value of a target configuration item;
The presentation is for representing a setting code of at least one configuration field, comprising:
Displaying a setting code for representing a configuration string; the configuration character string is composed of the configuration fields, wherein the first four bits of the configuration character string are the beginning fields, and the last four bits are the end fields.
In a second aspect of the present application, there is provided a device configuration method applied to a target device, the method comprising:
Scanning a target setting code; wherein the target setting code is obtained based on the following manner: in response to a configuration operation aiming at target equipment, identifying each target configuration item aimed at by the configuration operation, wherein the target equipment maintains a native correspondence in advance, an identification correspondence between each configuration item and each native identification is established in advance, and an address correspondence between each native identification and a memory address is established in advance, and the native identification is an identification used in the native correspondence of the target equipment; for each target configuration item, determining a native identifier corresponding to the target configuration item based on the identifier correspondence, and taking the native identifier as a target native identifier corresponding to the target configuration item; generating a native identification field for representing a target native identification corresponding to the target configuration item as a native identification field corresponding to the target configuration item for each target configuration item;
generating a target setting code based on each of the native identification fields;
analyzing the target setting code to obtain each original identification field;
And determining a memory address corresponding to the target native identifier represented by the native identifier field based on the identifier correspondence for each native identifier field, and processing information stored in the memory address.
In one possible implementation manner, the generating a target setting code based on each of the native identification fields includes:
Identifying the processing mode of the configuration operation aiming at each target configuration item;
generating an operation field for recording the processing mode of each target configuration item as the operation field of the target configuration item;
Generating a target setting code based on each of the native identification fields, each of the operation fields, and a first correspondence between each of the operation fields and the native identification fields;
The parsing the target setting code to obtain each native identification field includes:
Analyzing the setting code to obtain each original identification field, each operation field and the first corresponding relation.
In one possible implementation manner, the generating a target setting code based on each of the native identification fields includes:
identifying the type of the processing mode of the configuration operation aiming at each target configuration item;
Generating a type field for recording the type of the processing mode of each target configuration item as the type field of the target configuration item;
Generating a target setting code based on the respective native identification fields, the respective type fields, and a second correspondence between the respective type fields and the native identification fields;
the parsing the target setting code to obtain a native identification field includes:
analyzing the setting code to obtain each original identification field, each type field and the second corresponding relation;
The determining the memory address corresponding to the target native identifier represented by the native identifier field based on the identifier correspondence, and processing the information stored in the memory address includes:
And determining a type field corresponding to the native identification field according to the second corresponding relation, determining a memory address corresponding to the target native identification represented by the native identification field based on the identification corresponding relation, and processing information stored in the memory address according to a processing mode corresponding to the type field.
In a third aspect of the present application, there is provided a device configuration apparatus for use in a master device, the apparatus comprising:
The device comprises an identification module, a configuration operation module and a memory address module, wherein the identification module is used for responding to the configuration operation aiming at target equipment and identifying each target configuration item aimed at by the configuration operation, wherein the target equipment maintains a primary corresponding relation in advance, an identification corresponding relation between each configuration item and each primary identification is established in advance, and an address corresponding relation between each primary identification and the memory address is established in advance, and the primary identification is used in the primary corresponding relation of the target equipment;
The acquisition module is used for determining a native identifier corresponding to each target configuration item based on the identifier corresponding relation and taking the native identifier as a target native identifier corresponding to the target configuration item;
the generation module is used for generating a native identification field for representing a target native identification corresponding to each target configuration item as a native identification field corresponding to the target configuration item;
The display module is used for displaying the setting codes used for representing the original identification fields, so that the target equipment scans and analyzes the setting codes to obtain the original identification fields, and for each original identification field, a memory address corresponding to the target original identification represented by the original identification field is determined based on the identification corresponding relation, and information stored in the memory address is processed.
In a fourth aspect of the present application, there is provided a device configuration apparatus for application to a target device, the apparatus comprising:
The scanning module is used for scanning the target setting code; wherein the target setting code is obtained based on the following manner: in response to a configuration operation aiming at target equipment, identifying each target configuration item aimed at by the configuration operation, wherein the target equipment maintains a native correspondence in advance, an identification correspondence between each configuration item and each native identification is established in advance, and an address correspondence between each native identification and a memory address is established in advance, and the native identification is an identification used in the native correspondence of the target equipment; for each target configuration item, determining a native identifier corresponding to the target configuration item based on the identifier correspondence, and taking the native identifier as a target native identifier corresponding to the target configuration item; generating a native identification field for representing a target native identification corresponding to the target configuration item as a native identification field corresponding to the target configuration item for each target configuration item; generating a target setting code based on each of the native identification fields;
the analysis module is used for analyzing the target setting code to obtain each original identification field;
The configuration module is used for determining a memory address corresponding to the target native identifier represented by the native identifier field based on the identifier correspondence for each native identifier field, and processing information stored in the memory address.
In a fifth aspect of the present application, there is provided an electronic apparatus comprising:
a memory for storing a computer program;
A processor, configured to implement the method according to any one of the first aspect or the second aspect when executing a program stored in a memory.
In a sixth aspect of the present application, there is provided a computer readable storage medium having stored thereon a computer program which when executed by a processor implements the method of any of the first or second aspects.
The embodiment of the application has the beneficial effects that:
According to the device configuration method and device, each target configuration item aimed at by the configuration operation is identified through responding to the configuration operation aiming at the target device, then the original identification corresponding to the target configuration item is determined based on the identification corresponding relation, the original identification field used for representing the target original identification corresponding to the target configuration item is generated, then the setting code is generated based on the original identification field, the setting code is displayed, so that the target device scans and analyzes the setting code to obtain each original identification field, each original identification field is aimed at, the memory address corresponding to the target original identification represented by the original identification field is determined based on the identification corresponding relation, and the information stored in the memory address is processed. In this embodiment, since the target device maintains the native correspondence in advance, the identifier correspondence between each configuration item and each native identifier and the address correspondence between each native identifier and the memory address may be pre-established, after the native identifier field obtained by scanning and resolving the target setting code later, the memory address corresponding to the native identifier may be located, and finally, the information stored in the memory address may be processed. Corresponding memory addresses can be obtained by resolving all the original identification fields. The pre-maintained primary corresponding relation of each device has uniqueness, so that the primary identifier corresponds to the configuration item one by one and the primary identifier corresponds to the memory address one by one, even if a new function is added, the primary identifier can be positioned to the memory address corresponding to the target configuration item one by one only by ensuring the primary identifier corresponds to the configuration item one by one and the primary identifier corresponds to the memory address one by one, and then the information stored in the memory address is processed.
Of course, it is not necessary for any one product or method of practicing the application to achieve all of the advantages set forth above at the same time.
Drawings
In order to more clearly illustrate the embodiments of the application or the technical solutions in the prior art, the drawings used in the embodiments or the description of the prior art will be briefly described below, and it is obvious that the drawings in the following description are only some embodiments of the application, and other embodiments may be obtained according to these drawings to those skilled in the art.
Fig. 1a is a schematic diagram of an example of content of a set code string according to an embodiment of the present application;
fig. 1b is a schematic diagram of an example of command enabling content based on a custom set code string according to an embodiment of the present application;
fig. 2 is a schematic flow chart of a device configuration method according to an embodiment of the present application;
fig. 3a is a schematic diagram of an interaction process between a first target device and a master device according to an embodiment of the present application;
fig. 3b is a schematic diagram of an interaction process between a second target device and a master device according to an embodiment of the present application;
fig. 4 is a schematic diagram of a first device configuration apparatus according to an embodiment of the present application;
fig. 5 is a schematic diagram of a second device configuration apparatus according to an embodiment of the present application;
fig. 6 is a schematic diagram of an electronic device according to an embodiment of the present application.
Detailed Description
The following description of the embodiments of the present application will be made clearly and completely with reference to the accompanying drawings, in which it is apparent that the embodiments described are only some embodiments of the present application, but not all embodiments. Based on the embodiments of the present application, all other embodiments obtained by the person skilled in the art based on the present application are included in the scope of protection of the present application.
Setting a code: the one-dimensional code or the two-dimensional code comprises configuration information of the code reading camera, wherein the configuration information is information required by the configuration of the code reading camera;
setting codes in batches: one-dimensional code or two-dimensional code containing at least one configuration information of the code reading camera.
In the application of the code reading camera, a user can connect the code reading camera through a client, and then configure the function of the code reading camera. However, there are user conditions that do not allow or wish to download or install a client for configuration. Therefore, it is necessary to communicate with the code reading camera by setting a code, a serial port or a network command, and then interact with each other to complete the configuration of the function of the code reading camera. In this case, a protocol is agreed to, which contains the content and data of each configuration item, and each configuration item information is recorded by a custom character string. As shown in fig. 1a, an example of the content of a set code string is shown, where a string "OPNC" is used to represent an "open code39 code", a string "CLSC" is used to represent an "close code39", "OPNC1289" is used to represent an "open code128", and so on, it can be seen that in the prior art, a specific string is required to represent different configuration item information each time, and the functions of a code reading camera are numerous, and the functions required to be configured are too many, and in the process of configuring each time, those skilled in the art consider many and easily repeated situations occur in the configuring process. An example of command enabling content based on a custom set Code string is shown in FIG. 1b, such as "Code39 Code enable", "Code128 Code enable" … …. However, in the above manner, if the functions of the code reading camera are continuously increased, new character strings need to be defined for the newly increased functions, which increases maintenance difficulty, and when developing the newly increased functions, developers need to consider the character strings defining the content of the configuration items of the newly increased functions, if the newly increased functions are not well defined, repeated definitions are easily caused, which causes disorder of configuration of the function items and affects efficiency of configuration of the device. For convenience of description, the custom character string of a configuration item is referred to as an associated attribute of the configuration item.
Based on this, an embodiment of the present application proposes a device configuration method, as shown in fig. 2, applied to a master device, where the method includes:
S201, responding to configuration operation aiming at target equipment, and identifying each target configuration item aiming at the configuration operation.
S202, determining a native identifier corresponding to the target configuration item based on the identifier correspondence relation for each target configuration item, and taking the native identifier as a target native identifier corresponding to the target configuration item.
S203, generating a native identification field for representing the target native identification corresponding to the target configuration item as a native identification field corresponding to the target configuration item for each target configuration item.
S204, displaying a setting code for representing each native identification field, so that the target device scans and analyzes the setting code to obtain each native identification field, determining a memory address corresponding to the target native identification represented by the native identification field based on the identification correspondence for each native identification field, and processing information stored in the memory address.
In this embodiment, since the target device maintains the native correspondence in advance, the identifier correspondence between each configuration item and each native identifier and the address correspondence between each native identifier and the memory address may be pre-established, after the native identifier field obtained by scanning and resolving the target setting code later, the memory address corresponding to the native identifier may be located, and finally, the information stored in the memory address may be processed. Corresponding memory addresses can be obtained by resolving all the original identification fields. The pre-maintained primary corresponding relation of each device has uniqueness, so that the primary identifier corresponds to the configuration item one by one and the primary identifier corresponds to the memory address one by one, even if a new function is added, the primary identifier can be positioned to the memory address corresponding to the target configuration item one by one only by ensuring the primary identifier corresponds to the configuration item one by one and the primary identifier corresponds to the memory address one by one, and then the information stored in the memory address is processed.
The embodiment of the application is applied to a code reading camera or any electronic equipment with a code reading function.
The code reading camera has a plurality of functions, and each function corresponds to a parameter. The configuration of the function is realized by the parameter value of the configuration parameter. The configuration items are parameters corresponding to the functions of the code reading camera to be configured.
The above-described S201 to S204 will be described in detail below, respectively.
In S201, correspondence between the identifications of the respective attributes and the attributes is maintained in the target device. In the embodiment of the application, the corresponding relations which are maintained in the target devices are multiplexed. In the multiplexing native correspondence in the present application, the native identifier should satisfy: uniqueness, high maintainability and simplicity. The native correspondence maintained in the target device is a correspondence between the native identifier and the native attribute. The pre-established identifier corresponding relation between each configuration item and each native identifier and the pre-established address corresponding relation between each native identifier and the memory address are established according to the configuration item and the associated attribute thereof, wherein the associated attribute is the native attribute and the native identifier related to the native corresponding relation related to the configuration item. Therefore, the identification correspondence and the address correspondence also satisfy: uniqueness, high maintainability and simplicity, wherein,
Uniqueness: the configuration items and the association attributes are in one-to-one correspondence, one configuration item corresponds to one association attribute, and the correspondence cannot be repeated.
High maintainability: the one-to-one correspondence between the configuration items and the associated attributes is low in maintenance cost when the configuration items are changed or added later, and more resources can not be spent for management along with the increase of the configuration items.
The simplicity is as follows: the content of the configuration items and the associated attributes is convenient to define, and for the newly added configuration items, a developer can conveniently and quickly give the configuration items when thinking about the definition.
It can be understood that the high maintainability and simplicity are enough and simple in definition, and preferably can have simple regularity, so that excessive resource maintenance is not required to be spent later, and a developer can conveniently and quickly give the newly added configuration item when thinking about definition. Not a more complex string as shown in fig. 1a, the developer needs to think about how to define when adding the functions.
When the configuration item and the native identifier are associated, the native identifier only needs to meet the requirements of uniqueness, high maintainability and simplicity. For example, it may be a register address in the target device, an attribute Name (Name) of an attribute, or the like. Whichever the native identifier is, it is obtained from an xml file in the existing protocol and does not require human customization. That is, in the present application, the original correspondence between the identifiers of the original respective attributes in the target device and the attributes is actually multiplexed to generate the subsequent setting code.
The following description uses the native identifier as a register address as an example, where the identifier correspondence is a correspondence between each configuration item and each register address, and the address correspondence is a correspondence between each register address and a memory address. Because the register is unique. When the configuration is carried out later, the configuration items are determined, the registers corresponding to the configuration items can be determined through the identification of the corresponding relation, and then the memory addresses corresponding to the registers can be determined through the address corresponding relation. Since the register address is unique, it is also possible to simply linearly number the registers. For example, the register of the target device is numbered, and the register of the target device is numbered: the corresponding relation of the identifiers of the register 1, the register 2 and the registers 3 and … … is the corresponding relation of the configuration item and the register identifier, and the corresponding relation of the addresses is the corresponding relation between the address identifiers of the registers and the memory addresses. For ease of understanding, the description of the native identifiers in the following description will take registers as examples, and the other cases are the same, and will not be described in any greater detail.
Through the identification corresponding relation and the address corresponding relation, the configuration items, the memory addresses and the original identifications can be associated, and further follow-up configuration operation is achieved.
The configuration operation may be entered by the user via the client based on actual configuration requirements. For example, there is a configuration terminal, parameter information of configuration items of the target device is loaded to the configuration terminal through binding with the target device, the client terminal selects at least one configuration item to be configured based on a configuration interface of the configuration terminal, then generates a configuration operation instruction based on the at least one configuration item, and then sends the configuration operation instruction to the master device. The target device in the embodiment of the application can be a code reading camera or any electronic device with a code reading function. The configuration terminal establishes communication connection with the main control device, and the configuration terminal can be on the target device or can be other electronic devices bound with the target device. The binding manner of the target device and the configuration terminal is the same as that in the prior art, and will not be described in detail herein.
Taking the target device 1 as an example, assuming that the client needs to configure the parameters 2 and 3 for the target device, the client clicks operation buttons corresponding to the configuration items 2 and 3 in the configuration interface, generates a configuration instruction comprising configuration operation, and sends the configuration instruction to the main control device. The master control equipment receives the configuration operation and identifies a target configuration item aimed by the configuration operation: configuration item 2, configuration item 3.
In S202, since the identifier correspondence has already been established, the native identifier of the target configuration item may be determined directly through the identifier correspondence.
Taking the foregoing target device 1 as an example, the target configuration items are: configuration item 2 and configuration item 3, assuming that configuration item 2 is associated with parameter 2, configuration item 3 is associated with parameter 3, and the obtained native identifier for configuration item 2 is: the address of register 2, the native identifier obtained for configuration item 3 is: the address of register 3.
In S203, the native identification field may be a field for uniquely characterizing the native identification. The field may be all the fields of the native identifier, or may be a partial field for characterizing the native identifier.
Taking the foregoing target device 1 as an example, for the target configuration item: the corresponding native identifier of configuration item 2 is: the address of register 2, the generation of the native identification field may be: the address of the register 2 may be an identification of the register 2. Similarly, for the target configuration item: the corresponding native identifier of configuration item 3 is: the address of register 3, the generation of the native identification field may be: the actual address of the register 3 may be the identity of the register 3.
In the embodiment of the application, the register address is fixed in bit length, for example, the register address can be fixed in eight bits or fixed in nine bits. The bit length of the register address of each device is the same. Those skilled in the art can set the device according to the actual application scenario. To further normalize the native field, if the native identification is a register, the native identification field may be generated based on the identification of the register and the native identification should be a fixed bit length.
In S204, before the setting code for representing the native identifier field corresponding to each target configuration item is displayed, the setting code for the native identifier field corresponding to each target configuration item is generated. One set code may be generated for each target configuration item, and one set code may also be generated for each configuration operation. And setting according to actual application scenes.
Taking the foregoing target device 1 as an example, assuming that the native identifier is a register, the identifier of the register 2 is 2, the identifier of the register 3 is 3, and the fixed bit length of the native identifier field is 2 bits, the native identifier field of the record register 2 is: 02, the method comprises the following steps of (1) 02; the native identification field of record register 3 is: 03, the native identifier field corresponding to the target configuration item is: 0203.
Generating a setting code 1 of a primary identification field 0203, and scanning the setting code 1 by target equipment to obtain the primary identification field 0203, wherein as the fixed length of each primary identification field is 2 bits, two primary identification fields are further analyzed, and are respectively: 02, 03; for 02, determining a memory address 1 corresponding to 02 based on the address corresponding relation, and processing parameter values stored in the memory address 1; for 03, determining a memory address 2 corresponding to the 03 according to the address correspondence, and processing parameter values stored in the memory address 2; the details of how this is done will be described later, and will not be described in detail here.
There is a possibility that, when processing information stored in a memory, it is necessary to set the content of the stored information, that is, to set the parameter value of the parameter of the device, for example, to set the parameter information 1 stored in the original memory as the parameter information 2, that is, to set the parameter value of the parameter of the device from the parameter value 1 to the parameter value 2, and in this case, it is necessary to know what the stored content is to be set to and new content information to be set. And the information stored in the memory cannot be processed only by the native identification field. Based on this, in order to solve the above-mentioned problem, the above-mentioned method further includes:
S205, identifying the processing mode of the configuration operation aiming at each target configuration item.
In the step, the processing mode of the target configuration item is how to process the target configuration item; for example, the processing means includes, but is not limited to: setting, acquiring, controlling and the like. Wherein, setting is to set the target configuration item to the parameter value represented by the processing mode, for example, setting the shutter time of the camera to be: 0.2 seconds; acquiring parameter information of the target configuration item, for example, acquiring various shooting parameter values of a camera; the control is to control the target configuration item, for example, control the camera to turn on the light filling lamp.
The target configuration item can be set to be new content; the content of the target configuration item can be acquired; control of the target configuration item is also possible.
S206, generating an operation field of a processing mode for recording the target configuration item as the operation field of the target configuration item for each target configuration item.
In this step, not every target configuration item is processed in a manner having an operation value.
For example, for a set processing style, the processing style of the target configuration item must generate an operation field for recording the processing style of the target configuration item. The operation field of the operation value of the processing mode of the target configuration item is a character string corresponding to the new parameter information set to the target configuration item.
For the acquired processing manner, an operation field for recording the processing manner of the target configuration item may or may not be generated. If so, the operation field of the processing mode of the target configuration item may be a specific format of the acquired parameter information, or may be how much of the acquired parameter information is, for example, how many bits of parameter information before the acquisition. The acquired processing manner is not an important point of the present application, so that redundant description is not made, and the default acquired processing manner in the embodiment of the present application is an operation field for generating the processing manner for recording the target configuration item.
For the controlled processing manner, an operation field for recording the processing manner of the target configuration item may or may not be generated. If so, the operation field of the processing mode of the target configuration item may be an identification of the type of execution control. For example, the identification may be 0, 1,2, where 0 indicates that the contents of the target configuration item are emptied, 1 indicates that the target configuration item is modified to a default value, and 2 indicates that the target configuration item is restored to the last set contents. The operation field of the controlled processing mode may not be generated, and in this case, the target configuration item may be modified to a default value. In particular how to set the identification of the control type, those skilled in the art can set the control type according to the actual application scenario. In the case of the default control processing manner in the embodiment of the present application, the operation field of the processing manner for recording the target configuration item is not generated.
Since only the set processing manner generates the operation field of the processing manner for recording the target configuration item under the default condition, for convenience of description, the subsequent description only describes the manner of generating the set operation field, and similarly, the manner and the setting of other processing manners of generating the operation field of the processing manner for recording the target configuration item are the same, and redundant description is omitted herein. For ease of description, the native identification fields described later are each the actual address of the register. Similarly, if the primary identification field has the condition of generating the identification of the register, the fixed bit length of the primary identification field can be distinguished from other fields, and redundant description is omitted.
Taking the target device 1 as an example, a target configuration item is identified: the processing mode of the configuration item 2 is acquisition, and a target configuration item is identified: the processing mode of the configuration item 3 is set. Assuming that the native identifier is a register address, the fixed bit length of a register in the target device 1 is 8 bits, the register address of a register corresponding to the configuration item 2 is 00000068, the native identifier corresponding to the configuration item 2 is 00000068, the register address of a register corresponding to the configuration item 3 is 00030b04, the native identifier corresponding to the configuration item 3 is 00030b04, and the operation value of the processing mode of the configuration item 3 is 2bc; then for the target configuration item for which there is an operation value: configuration item 3, generating operation fields as follows: 2bc.
In one possible embodiment of the present invention,
If the processing mode is that the character string is set, an operation field composed of the identification of the character string and the ASCII code of the character string is generated and used as the operation field of the target configuration item.
In this step, if the processing mode is set to be a character string, an operation field composed of an identifier and an ASCII code of the character string is generated, so that different types of operation values can be set, and further, the type of equipment configuration can be improved, and the applicability is improved. The identification of the string is used to indicate the operation field generated by the ASCII code to the string. For example, $, or the like. For example, the string may be $3132333435, × 3132333435.
Further, the step S204 may specifically be:
S204a, a setting code for representing each native identification field, each operation field, and a first correspondence between each operation field and the native identification field is shown.
The target device scans and analyzes the setting code to obtain each primary identification field, each operation field and a first corresponding relation, determines the operation field corresponding to the primary identification field according to the first corresponding relation for each primary identification field, determines a memory address corresponding to the target primary identification represented by the primary identification field based on the identification corresponding relation, and processes information stored in the memory address.
In this step, the first correspondence is a correspondence between an operation field and a native identification field, that is, after determining the native identification field, the corresponding operation field may be determined by using the native identification field. For example, a fixed positional relationship between the native identifier field and the operation field may be used, for example, the operation field is added at a position immediately adjacent to the native identifier field, or the operation field may be located at the second two bits of the native identifier field, where the positional relationship is the first correspondence relationship, and the positional relationship needs to be fixed and unique. An indicator can be added at the position of the original identification field, the indicator directly points to the operation field corresponding to the original identification field, and the indicator is the first corresponding relation. The specific first corresponding relation display mode can be set according to the actual application scene. For convenience of description, the first correspondence relationship is described in a positional relationship in the following description.
Taking the configuration item 3 of the target device 1 as an example, the respective native identifier fields, the respective operation fields, and the character strings of the first correspondence between the respective operation fields and the native identifier fields are: 00030b042bc, the setting code generated based on 00030b042bc is setting code 2. The target device 1 scans the setting code 2 and analyzes the setting code to obtain a character string: 00030b042bc, according to the length of the preset native identification field being 8, the first 8 bits in the character string are used as the native identification field, namely the native identification field: 00030b04, the operation field is immediately after the native identification field, that is, the operation field: 2bc, first correspondence: 00030b042bc, determining a memory address corresponding to the target native identifier represented by the native identifier field based on the identifier correspondence, and setting the information stored in the memory address to 2bc.
In the embodiment of the application, the processing mode of the configuration operation aiming at each target configuration item can be identified, the operation field of the processing mode can be generated, and then the setting code used for representing the operation field, the original identification field and the first corresponding relation is generated, so that the target configuration item can be set to be the content which is required to be set, and the flexibility of equipment configuration is improved.
In an actual application scenario, there are many processing manners for the configuration item, and subsequent processing procedures of different processing manners are different, so that in order to better distinguish different processing manners, the method may further include:
s207, identifying the type of the processing mode of the configuration operation aiming at each target configuration item.
In this step, for convenience of management, different processing modes may be represented by type identifiers. For example, the processing manner of the acquisition type may be characterized by an identifier 1, the processing manner of the acquisition type may be characterized by an identifier 2, and the processing manner of the acquisition type may be characterized by an identifier 3. Other identifiers that may be used to distinguish between different types may also be used in embodiments of the present application. Based on this, the type of the processing mode of the identification configuration operation for each target configuration item is the type identifier of the processing mode of the identification configuration operation for each target configuration item.
S208, generating a type field of the type of the processing mode for recording the target configuration item as a type field of the target configuration item for each target configuration item.
In this step, the type field may be represented by an identifier of a type, in which information for representing a type is recorded, for example, numbers may be recorded in the type field, and numbers 1,2, 3, … … are used to represent different types of processing manners, letters may also be recorded in the type field, and a, b, c, … … are used to represent different types of processing manners. For convenience of description, the obtained type field is represented by the number 1, the set type field is represented by the number 2, and the controlled type field is represented by the number 3, and the other types of processing methods and the obtained, set and controlled conditions are the same, which are not repeated here.
Taking the foregoing target device 1 as an example, the master device identifies a target configuration item: the processing mode of the configuration item 2 is acquisition, the acquired type identifier is 0, and the target configuration item is identified: the processing mode of the configuration item 3 is setting, and the type identifier of the setting is 1. Then for the target configuration item for which there is an operation value: configuration item 2, the generation type field is: 0, then for the target configuration item for which there is an operation value: configuration item 3, the generation type field is: 1.
Based on this, the above S204 may specifically be:
s204b, a setting code used for representing each primary identification field, each type field and a second corresponding relation between each type field and the primary identification field is displayed, so that the target equipment scans and analyzes the setting code to obtain each primary identification field, each type field and the second corresponding relation, determines a type field corresponding to the primary identification field according to the second corresponding relation for each primary identification field, determines a memory address corresponding to the target primary identification represented by the primary identification field based on the identification corresponding relation, and processes information stored in the memory address according to a processing mode corresponding to the type field.
In this step, the second correspondence is a correspondence between the type field and the native identification field, that is, after determining the native identification field, the corresponding type field may be determined by using the native identification field. For example, the position relationship between the native identifier field and the type field may be fixed, for example, the type field immediately precedes the native identifier field, or the type field follows the native identifier field by two bits, etc., where such position relationship is the second correspondence, and an indicator may be added at the position of the native identifier field, where the indicator points directly to the type field corresponding to the native identifier field, and the indicator is the second correspondence. The specific second corresponding relation display mode can be set according to the actual application scene. For convenience of description, the second correspondence relationship is described in terms of positional relationship in the following description.
Taking the foregoing target device 1 as an example, the respective native identifier fields, the respective types of fields, and the character strings of the second correspondence relationship between the respective types of fields and the native identifier fields are: 000000068100030b04, the setting code generated based on 000000068100030b04 is setting code 3. The target device 1 scans the setting code 3 and parses the setting code to obtain a character string: 000000068100030b04, according to the preset length of the primary identification field is 8, the length of the type field is 1, and the type field is immediately before the primary identification field, so that each 9-bit character string corresponds to a target configuration item, the first bit in the first 9-bit character string is the type field, the last eight bits are the primary identification field, and similarly, the first bit in the last 9-bit character string is the type field, and the last eight bits are the primary identification field, so that the primary identification field is obtained: 00000068, 00030b04, type field: 0,1, second correspondence: 000000068, 100030b04, for 00000068, determining a memory address corresponding to the target native identifier represented by the native identifier field 00000068 based on the identifier correspondence, and processing information stored in the memory address. For 00030b04, a memory address corresponding to the target native identifier represented by the native identifier field 00030b04 is determined based on the identifier correspondence relationship, and setting processing is performed on information stored in the memory address.
In the embodiment of the application, the type of the processing mode of each target configuration item is identified by the configuration operation, and then the corresponding type field is generated, so that the target configuration items of different processing modes can be distinguished, the subsequent analysis efficiency can be improved, and the equipment configuration efficiency can be further improved.
In one possible embodiment, there may be more than one target configuration item of the same processing mode type, which may be consolidated in order to further increase the efficiency of device configuration. The method further comprises the following steps:
S209, counting the number of target configuration items of each type, which belongs to the type, as the corresponding number of the types.
S210, generating a number field for representing the number corresponding to the type as a number field corresponding to the type for each type.
Based on this, the above S204b may specifically be:
a setting code for representing at least one configuration field is shown.
In this step, each configuration field corresponds to a type, and each configuration field includes a type field of the type corresponding to the configuration field, a number field corresponding to the type, and a native identification field of the target configuration item of the type, where the number field corresponding to the type is consecutive to the native identification field of the target configuration item of the type before the native identification field of the target configuration item of the type, and the configuration field is used to characterize a second correspondence between the type field and the native identification field.
The type field, the number field and the position of the native identification field of the target configuration item of the type are not particularly limited, but the type field, the number field and the position of the native identification field of the target configuration item of the type are guaranteed to be the same rule. That is, it should be ensured that the generated character string is easy to parse, so that the correct information can be parsed quickly when the set code is parsed later.
Illustratively, assume that identifying the target configuration item for which the configuration operation is directed to target device 2 is: configuration item 1, configuration item 2, configuration item 3 and configuration item 4, wherein the native identifier corresponding to configuration item 1 is 00000068, the native identifier corresponding to configuration item 2 is 00030b04, the native identifier corresponding to configuration item 3 is 00004014, the native identifier corresponding to configuration item 4 is 00030180, the type field of the acquired type is 0, the type field of the set type is 1, and the type field of the control type is 2; the processing modes of the configuration items 1,2 and 3 are acquisition, the processing mode of the configuration item 4 is control, the number of acquisition types is 3, and the number of control types is 1. Thus, the resulting configuration field is: 00030000006800030b0400004014200100030180. Generating a setting code 3 based on the configuration field 00030000006800030b0400004014100100030180, and analyzing the setting code 3 by the target device 2 to obtain a character string: 00030000006800030b0400004014100100030180, according to the preset length of the primary identification field is 8, the length of the type field is 1, the length of the number field is 3, and the type field is immediately before the number field, and the number field is immediately before the primary identification field. Thus, the native identification field is obtained: 00000068, 00030b04, 00004014, 00030180; type field: 0.1, number field: 003. 001, second correspondence: 00030000006800030b0400004014, 100100030180, and further performing acquisition processing on information stored in a memory address corresponding to a target native identifier indicated by 00000068, information stored in a memory address corresponding to a target native identifier indicated by 00030b04, information stored in a memory address corresponding to a target native identifier indicated by 00004014, performing control processing on information stored in a memory address corresponding to a target native identifier indicated by 00030180 based on the address correspondence,
In the embodiment of the application, the number of each type of target configuration item is counted to sort each target configuration item aimed by configuration operation, repeated fields are removed, and fields corresponding to the same type of target configuration item are sorted together, so that system resources can be saved, the arrangement is more orderly, and the efficiency of equipment configuration can be improved.
In a possible embodiment, for a target configuration item of a preset type, there are some new parameters to be configured, based on which the above method further includes:
S211, identifying a processing mode of the configuration operation aiming at a target configuration item of a preset type.
In the step, a target configuration item of a preset type is a configuration item needing to be configured with a new parameter value; for example, setting, controlling.
S212, generating an operation field of a processing mode for recording the target configuration item as the operation field of the target configuration item aiming at each target configuration item of the preset type.
The step is the same as the step S206, and will not be repeated here. If the type corresponding to the configuration field belongs to the preset type, the configuration field further comprises: the operation field of the target configuration item of the type is further used for representing a first corresponding relation between the operation field of the target configuration item of the type and the address sub-segment. Since the length of the operation field is variable, in order to facilitate the subsequent parsing of the configuration field, the different configuration fields may be separated by a separator. For example, the separator may be "; ","/", and the like.
Taking the foregoing target device 2 as an example, assume that the target configuration item for which the configuration operation for the target device 2 is identified is: configuration item 1, configuration item 2, configuration item 3 and configuration item 4, wherein the native identifier corresponding to configuration item 1 is 00000068, the native identifier corresponding to configuration item 2 is 00030b04, the native identifier corresponding to configuration item 3 is 00004014, the native identifier corresponding to configuration item 4 is 00030180, the type field of the acquired type is 0, the type field of the set type is 1, and the type field of the control type is 2; the processing mode of the configuration item 1 is acquisition, the processing modes of the configuration item 2 and the configuration item 3 are operation, the processing mode of the configuration item 4 is control, the number of acquisition types is 1, and the number of setting types is as follows: 2, the number of control types is 1; the operation fields of configuration item 2 are: 2bc, the operation field of configuration item 3 is: 3a. Thus, the resulting configuration field is: 000100000068;100200030b042bc000040143a;200100030180. based on the configuration field 000100000068;100200030b042bc000040143a;200100030180 generating a setting code 4, and analyzing the setting code 4 by the target device 2 to obtain a character string: 000100000068;100200030b042bc000040143a;200100030180, according to the preset length of the primary identification field being 8, the length of the type field being 1, the length of the number field being 3, and the type field being immediately before the number field, the number field being immediately before the primary identification field, the primary identification field being immediately before the operation field, thus obtaining the primary identification field: 00000068, 00030b04, 00004014, 00030180; type field: 0. 1, 2, number field: 001. 002, 001, first correspondence: 00030b042bc, 000040143a, further, based on the address correspondence, performing acquisition processing on the information stored in the memory address corresponding to the target native identifier indicated by 00000068, based on the address correspondence, performing control processing on the information stored in the memory address corresponding to the target native identifier indicated by 00030180, based on the address correspondence, setting the information stored in the memory address corresponding to the target native identifier indicated by 00030b04 to 2bc, and based on the address correspondence, setting the information stored in the memory address corresponding to the target native identifier indicated by 00004014 to 3a.
In this embodiment, on the basis of sorting the target configuration items, an operation field corresponding to the processing mode of the target configuration item of the preset type is generated, so that information about the operation field can be added in the generated configuration code, further, parameter values of the configuration item of the preset type can be configured later, and further, the device configuration applicability is improved.
In order to further make the configuration fields more organized, in the embodiment of the present application, the configuration fields are divided by a first separator; configuring a first bit of a field as a type field, a second bit to a fourth bit as a number field, and a fifth bit to a thirteenth bit as a primary identification field, wherein if the number corresponding to the number field is greater than 1, the primary identification fields are separated by a second separator; if the type of the target configuration item corresponding to the configuration field is a preset type, the fourteenth bit and the operation field of the target configuration item after the fourteenth bit are the preset type, wherein the preset type comprises a setting type; the operation field is a configuration value of the target configuration item.
Showing a setting code for representing at least one configuration field, comprising:
displaying a setting code for representing a configuration string; the configuration character string is composed of configuration fields, wherein the first four bits of the configuration character string are the head fields, and the last four bits are the tail fields.
In this step, in order to better separate each target configuration item and improve the efficiency of resolving the configuration code, the configuration fields are separated by a first separator and the respective native identification fields are separated by a second separator before the configuration code is generated. Wherein the first separator and the second separator are different. For example, the first separator may be "; the second separator may be ",". It may also be that the first separator may be "; the second separator may be ",". The beginning and ending fields are set by those skilled in the art. For example, the beginning field @ #, the ending field # @, the beginning field @ #, and the ending field # @.
Illustratively, taking the foregoing target device 2 as an example, assume that identifying the target configuration item for which the configuration operation is directed to the target device 2 is: configuration item 1, configuration item 2, configuration item 3 and configuration item 4, wherein the native identifier corresponding to configuration item 1 is 00000068, the native identifier corresponding to configuration item 2 is 00030b04, the native identifier corresponding to configuration item 3 is 00004014, the native identifier corresponding to configuration item 4 is 00030180, the type field of the acquired type is 0, the type field of the set type is 1, and the type field of the control type is 2; the processing mode of the configuration item 1 is acquisition, the processing modes of the configuration item 2 and the configuration item 3 are operation, the processing mode of the configuration item 4 is control, the number of acquisition types is 1, and the number of setting types is as follows: 2, the number of control types is 1; the operation values of configuration item 2 are: 2bc, the operation value of configuration item 3 is: 3132333435, wherein 3132333435 is ASCII code. Thus, the resulting configuration field is: 000100000068;100200030b042bc,000040143a;200100030180. based on the configuration field 000100000068;100200030b042bc,000040143a;200100030180 obtains configuration character string% @ #000100000068; 100200030b042bc,00004014$3132333435;200100030180# @ based on the configuration string% @ 000100000068;100200030b042bc,00004014$3132333435;200100030180# @ percent generates a setting code 4, and the target device 2 scans the setting code 4 to analyze to obtain a character string: "% @ #000100000068;100200030b042bc,00004014$3132333435; 200100030180# @, according to the preset length of the primary identification field being 8, the length of the type field being 1, the length of the number field being 3, and the type field immediately preceding the number field, the number field immediately preceding the primary identification field, the primary identification field immediately preceding the operation field, thus obtaining the primary identification field: 00000068, 00030b04, 00004014, 00030180; first correspondence: 00030b042bc,00004014$3132333435, type field: 0. 1, 2, number field: 001. 002, 001, further performing acquisition processing on information stored in a memory address corresponding to the target native identifier indicated by 00000068 based on the address correspondence, performing control processing on information stored in a memory address corresponding to the target native identifier indicated by 00030180 based on the address correspondence, setting information stored in a memory address corresponding to the target native identifier indicated by 00030b04 to 2bc, And setting 3132333435 the information stored in the memory address corresponding to the target native identifier indicated by 00004014 based on the address correspondence.
In the embodiment of the application, the configuration character string is further managed, and different register addresses and configuration fields are separated by the separator, so that the information of the configuration character string is more obvious, the analysis efficiency is further improved, and the equipment configuration efficiency is improved.
The embodiment of the application also provides a device configuration method which is applied to the target device, wherein the interaction process of the target device and the main control device is shown in fig. 3a and 3b, in fig. 3a, IDAS is the main control device, the code reading camera is the target device, XML/JSON is a display interface for parameter function display through an Android SDK, namely, a configuration item of the target device in the display configuration interface, and Bin is a default value for acquiring the parameter function through a packaging library (llbgev.a), namely, parameter information of the configuration item is acquired. And then generating a setting code through a private protocol, analyzing the setting code by the code reading camera through a scanning identification setting code and a private protocol to obtain a configuration field, configuring the code reading camera by using configuration information represented by the configuration field, and effectively storing the configuration information. Fig. 3b is a schematic diagram of a process of configuring and scanning a code by a device code reading camera in an actual scene.
Illustratively, the method includes:
S301, scanning a target setting code.
In this step, the target setting code is obtained based on the following manner: in response to configuration operation for target equipment, identifying each target configuration item for the configuration operation, wherein the target equipment maintains a native correspondence in advance, an identification correspondence between each configuration item and each native identification is pre-established, and an address correspondence between each native identification and a memory address is pre-established, and the native identification is an identification used in the native correspondence of the target equipment; for each target configuration item, determining a native identifier corresponding to the target configuration item based on the identifier correspondence, and taking the native identifier as a target native identifier corresponding to the target configuration item; for each target configuration item, a native identification field for representing a target native identification corresponding to the target configuration item is generated as a native identification field corresponding to the target configuration item, and a target setting code is generated based on each native identification field.
S302, analyzing the target setting code to obtain each original identification field.
S303, for each native identification field, determining a memory address corresponding to the target native identification represented by the native identification field based on the identification correspondence, and processing information stored in the memory address.
In the embodiment of the present application, the process of generating the target setting code is the same as that of S201 to S203, and is not described in detail herein, and S303 is the same as that of S204, and is not described in detail herein.
In one possible embodiment, in generating the target setting code, further includes:
a. The processing mode of the configuration operation aiming at each target configuration item is identified.
B. For each target configuration item, an operation field for recording the processing manner of the target configuration item is generated as the operation field of the target configuration item.
The steps a and b are the same as the steps S205 to S206, and are not repeated here.
C. a target setting code is generated based on the respective native identification fields, the respective operation fields, and a first correspondence between the respective operation fields and the native identification fields.
The method for generating the setting code based on the field may be any method in the prior art, and will not be described herein.
The step S302 may specifically be:
s3021, analyzing the setting code to obtain each original identification field, each operation field and the first corresponding relation.
In one possible embodiment, in generating the target setting code, further includes:
d. the type of processing mode of the configuration operation aiming at each target configuration item is identified.
E. For each target configuration item, a type field for recording the type to which the processing mode of the target configuration item belongs is generated as the type field of the target configuration item.
The steps d and e are the same as the steps S207-S208, and are not repeated here.
F. a target setting code is generated based on the respective native identification fields, the respective types of fields, and a second correspondence between the respective types of fields and the native identification fields.
The method for generating the setting code based on the field may be any method in the prior art, and will not be described herein.
The step S302 may specifically be:
S3022, analyzing the setting code to obtain each original identification field, each type of field and the second corresponding relation.
The step S303 may specifically be:
S3031, for each primary identification field, determining a type field corresponding to the primary identification field according to the second corresponding relation, determining a memory address corresponding to the target primary identification represented by the primary identification field based on the identification corresponding relation, and processing information stored in the memory address according to a processing mode corresponding to the type field.
In this embodiment, since the target device maintains the native correspondence in advance, the identifier correspondence between each configuration item and each native identifier and the address correspondence between each native identifier and the memory address may be pre-established, after the native identifier field obtained by scanning and resolving the target setting code later, the memory address corresponding to the native identifier may be located, and finally, the information stored in the memory address may be processed. Corresponding memory addresses can be obtained by resolving all the original identification fields. The pre-maintained primary corresponding relation of each device has uniqueness, so that the primary identifier corresponds to the configuration item one by one and the primary identifier corresponds to the memory address one by one, even if a new function is added, the primary identifier can be positioned to the memory address corresponding to the target configuration item one by one only by ensuring the primary identifier corresponds to the configuration item one by one and the primary identifier corresponds to the memory address one by one, and then the information stored in the memory address is processed.
The embodiment of the application provides a device configuration device, which is applied to a main control device, as shown in fig. 4, and comprises:
an identifying module 401, configured to identify, in response to a configuration operation for a target device, each target configuration item for which the configuration operation is intended, where the target device maintains in advance a native correspondence, an identifier correspondence between each configuration item and each native identifier is pre-established, and an address correspondence between each native identifier and a memory address is pre-established, where the native identifier is an identifier used in the native correspondence of the target device;
An obtaining module 402, configured to determine, for each target configuration item, a native identifier corresponding to the target configuration item based on the identifier correspondence, as a target native identifier corresponding to the target configuration item;
a generating module 403, configured to generate, for each target configuration item, a native identifier field that is used to represent a target native identifier corresponding to the target configuration item, as a native identifier field corresponding to the target configuration item;
And the display module 404 is configured to display a setting code for representing each of the native identifier fields, so that the target device scans and parses the setting code to obtain each of the native identifier fields, determine, for each of the native identifier fields, a memory address corresponding to the target native identifier represented by the native identifier field based on the identifier correspondence, and process information stored in the memory address.
The embodiment of the application also provides a device configuration device, which is applied to the target device, as shown in fig. 5, and comprises:
A scanning module 501 for scanning the target setting code; wherein the target setting code is obtained based on the following manner: in response to a configuration operation aiming at target equipment, identifying each target configuration item aimed at by the configuration operation, wherein the target equipment maintains a native correspondence in advance, an identification correspondence between each configuration item and each native identification is established in advance, and an address correspondence between each native identification and a memory address is established in advance, and the native identification is an identification used in the native correspondence of the target equipment; for each target configuration item, determining a native identifier corresponding to the target configuration item based on the identifier correspondence, and taking the native identifier as a target native identifier corresponding to the target configuration item; generating a primary identification field for representing a target primary identification corresponding to the target configuration item as a primary identification field corresponding to the target configuration item for each target configuration item, and generating a target setting code based on each primary identification field;
the parsing module 502 is configured to parse the target setting code to obtain each native identifier field;
A configuration module 503, configured to determine, for each native identifier field, a memory address corresponding to the target native identifier represented by the native identifier field based on the identifier correspondence, and process information stored in the memory address.
The embodiment of the application also provides an electronic device, as shown in fig. 6, including:
a memory 601 for storing a computer program;
a processor 602, configured to execute a program stored in the memory 601, and implement the following steps:
In response to a configuration operation aiming at target equipment, identifying each target configuration item aimed at by the configuration operation, wherein the target equipment maintains a native correspondence in advance, an identification correspondence between each configuration item and each native identification is established in advance, and an address correspondence between each native identification and a memory address is established in advance, and the native identification is an identification used in the native correspondence of the target equipment;
for each target configuration item, determining a native identifier corresponding to the target configuration item based on the identifier correspondence, and taking the native identifier as a target native identifier corresponding to the target configuration item;
Generating a native identification field for representing a target native identification corresponding to the target configuration item as a native identification field corresponding to the target configuration item for each target configuration item;
And displaying a setting code used for representing each of the native identification fields, so that the target equipment scans and analyzes the setting code to obtain each native identification field, determining a memory address corresponding to the target native identification represented by the native identification field based on the identification correspondence for each native identification field, and processing information stored in the memory address. And the electronic device may further comprise a communication bus and/or a communication interface, through which the processor 602, the communication interface, and the memory 601 communicate with each other.
The communication bus mentioned above for the electronic device may be a peripheral component interconnect standard (PERIPHERAL COMPONENT INTERCONNECT, PCI) bus or an extended industry standard architecture (Extended Industry Standard Architecture, EISA) bus, etc. The communication bus may be classified as an address bus, a data bus, a control bus, or the like. For ease of illustration, the figures are shown with only one bold line, but not with only one bus or one type of bus.
The communication interface is used for communication between the electronic device and other devices.
The Memory may include random access Memory (Random Access Memory, RAM) or may include Non-Volatile Memory (NVM), such as at least one disk Memory. Optionally, the memory may also be at least one memory device located remotely from the aforementioned processor.
The processor may be a general-purpose processor, including a central processing unit (Central Processing Unit, CPU), a network processor (Network Processor, NP), etc.; but may also be a digital signal Processor (DIGITAL SIGNAL Processor, DSP), application SPECIFIC INTEGRATED Circuit (ASIC), field-Programmable gate array (Field-Programmable GATE ARRAY, FPGA) or other Programmable logic device, discrete gate or transistor logic device, discrete hardware components.
In yet another embodiment of the present application, there is also provided a computer readable storage medium having stored therein a computer program which, when executed by a processor, implements the steps of any of the device configuration methods described above.
In yet another embodiment of the present application, there is also provided a computer program product containing instructions that, when run on a computer, cause the computer to perform any of the device configuration methods of the above embodiments.
In the above embodiments, it may be implemented in whole or in part by software, hardware, firmware, or any combination thereof. When implemented in software, may be implemented in whole or in part in the form of a computer program product. The computer program product includes one or more computer instructions. When loaded and executed on a computer, produces a flow or function in accordance with embodiments of the present application, in whole or in part. The computer may be a general purpose computer, a special purpose computer, a computer network, or other programmable apparatus. The computer instructions may be stored in or transmitted from one computer-readable storage medium to another, for example, by wired (e.g., coaxial cable, optical fiber, digital Subscriber Line (DSL)), or wireless (e.g., infrared, wireless, microwave, etc.). The computer readable storage medium may be any available medium that can be accessed by a computer or a data storage device such as a server, data center, etc. that contains an integration of one or more available media. The usable medium may be a magnetic medium (e.g., floppy disk, hard disk, tape), an optical medium (e.g., DVD), or a Solid state disk (Solid STATE DISK, SSD), etc.
It is noted that relational terms such as first and second, and the like are used solely to distinguish one entity or action from another entity or action without necessarily requiring or implying any actual such relationship or order between such entities or actions. Moreover, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising one … …" does not exclude the presence of other like elements in a process, method, article, or apparatus that comprises the element.
In this specification, each embodiment is described in a related manner, and identical and similar parts of each embodiment are all referred to each other, and each embodiment mainly describes differences from other embodiments.
The foregoing description is only of the preferred embodiments of the present application and is not intended to limit the scope of the present application. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present application are included in the protection scope of the present application.

Claims (14)

1. A device configuration method, applied to a master device, the method comprising:
In response to a configuration operation aiming at target equipment, identifying each target configuration item aimed at by the configuration operation, wherein the target equipment maintains a native correspondence in advance, an identification correspondence between each configuration item and each native identification is established in advance, and an address correspondence between each native identification and a memory address is established in advance, and the native identification is an identification used in the native correspondence of the target equipment;
for each target configuration item, determining a native identifier corresponding to the target configuration item based on the identifier correspondence, and taking the native identifier as a target native identifier corresponding to the target configuration item;
Generating a native identification field for representing a target native identification corresponding to the target configuration item as a native identification field corresponding to the target configuration item for each target configuration item;
And displaying a setting code used for representing each of the native identification fields, so that the target equipment scans and analyzes the setting code to obtain each native identification field, determining a memory address corresponding to the target native identification represented by the native identification field based on the identification correspondence for each native identification field, and processing information stored in the memory address.
2. The method according to claim 1, wherein the method further comprises:
Identifying the processing mode of the configuration operation aiming at each target configuration item;
generating an operation field for recording the processing mode of each target configuration item as the operation field of the target configuration item;
the presentation is used for representing the setting code of each native identification field, and comprises:
And displaying a setting code used for representing each native identification field, each operation field and a first corresponding relation between each operation field and the native identification field, so that the target equipment scans and analyzes the setting code to obtain each native identification field, each operation field and the first corresponding relation, determining a memory address corresponding to a target native identification represented by the native identification field based on the identification corresponding relation for each native identification field, and processing information stored in the memory address.
3. The method according to claim 1, wherein the method further comprises:
identifying the type of the processing mode of the configuration operation aiming at each target configuration item;
Generating a type field for recording the type of the processing mode of each target configuration item as the type field of the target configuration item;
the presentation is used for representing the setting code of each native identification field, and comprises:
Displaying a setting code used for representing each native identification field, each type field and a second corresponding relation between each type field and the native identification field, so that the target device scans and analyzes the setting code to obtain each native identification field, each type field and the second corresponding relation, determining a type field corresponding to the native identification field according to the second corresponding relation for each native identification field, determining a memory address corresponding to a target native identification represented by the native identification field based on the identification corresponding relation, and processing information stored in the memory address according to a processing mode corresponding to the type field.
4. A method according to claim 3, characterized in that the method further comprises:
for each type, counting the number of target configuration items of the type, which are the corresponding number of the type, by the processing mode;
For each type, generating a number field for representing the number corresponding to the type as the number field corresponding to the type;
The presentation is configured to represent each of the native identification fields, each of the type fields, and a setting code of a second correspondence between each of the type fields and the native identification fields, and includes:
Displaying a setting code for representing at least one configuration field; each configuration field corresponds to a type, and each configuration field comprises a type field of the type corresponding to the configuration field, a number field corresponding to the type, and a native identification field of a target configuration item of the type, wherein the number field corresponding to the type is consecutive to the native identification field of the target configuration item of the type, and the configuration field is used for representing a second correspondence between the type field and the native identification field.
5. The method according to claim 4, wherein the method further comprises:
identifying a processing mode of the configuration operation aiming at a target configuration item of a preset type;
Generating an operation field for recording a processing mode of each target configuration item aiming at each target configuration item of a preset type, wherein the operation field is used as the operation field of the target configuration item;
if the type corresponding to the configuration field belongs to a preset type, the configuration field further includes: the operation field of the target configuration item of the type is further used for representing a first corresponding relation between the operation field and the native identification field of the target configuration item of the type.
6. The method according to claim 2, wherein generating, for each target configuration item, an operation field for recording a processing manner of the target configuration item includes:
If the processing mode is that the character string is set, an operation field composed of an identifier and an ASCII code of the character string is generated and used as the operation field of the target configuration item.
7. The method of claim 5, wherein the configuration fields are partitioned by a first separator; configuring a first bit of a field as a type field, a second bit to a fourth bit as a number field, and a fifth bit to a thirteenth bit as a primary identification field, wherein if the number corresponding to the number field is greater than 1, the primary identification fields are separated by a second separator; if the type of the target configuration item corresponding to the configuration field is a preset type, the fourteenth bit and the operation field of the target configuration item after the fourteenth bit are the preset type, wherein the preset type comprises a setting type; the operation field is a configuration value of a target configuration item;
The presentation is for representing a setting code of at least one configuration field, comprising:
Displaying a setting code for representing a configuration string; the configuration character string is composed of the configuration fields, wherein the first four bits of the configuration character string are the beginning fields, and the last four bits are the end fields.
8. A device configuration method, applied to a target device, the method comprising:
Scanning a target setting code; wherein the target setting code is obtained based on the following manner: in response to a configuration operation aiming at target equipment, identifying each target configuration item aimed at by the configuration operation, wherein the target equipment maintains a native correspondence in advance, an identification correspondence between each configuration item and each native identification is established in advance, and an address correspondence between each native identification and a memory address is established in advance, and the native identification is an identification used in the native correspondence of the target equipment; for each target configuration item, determining a native identifier corresponding to the target configuration item based on the identifier correspondence, and taking the native identifier as a target native identifier corresponding to the target configuration item; generating a primary identification field for representing a target primary identification corresponding to the target configuration item as a primary identification field corresponding to the target configuration item for each target configuration item, and generating a target setting code based on each primary identification field;
analyzing the target setting code to obtain each original identification field;
And determining a memory address corresponding to the target native identifier represented by the native identifier field based on the identifier correspondence for each native identifier field, and processing information stored in the memory address.
9. The method of claim 8, wherein generating a target setting code based on each of the native identification fields comprises:
Identifying the processing mode of the configuration operation aiming at each target configuration item;
generating an operation field for recording the processing mode of each target configuration item as the operation field of the target configuration item;
Generating a target setting code based on each of the native identification fields, each of the operation fields, and a first correspondence between each of the operation fields and the native identification fields;
The parsing the target setting code to obtain each native identification field includes:
Analyzing the setting code to obtain each original identification field, each operation field and the first corresponding relation.
10. The method of claim 8, wherein generating a target setting code based on each of the native identification fields comprises:
identifying the type of the processing mode of the configuration operation aiming at each target configuration item;
Generating a type field for recording the type of the processing mode of each target configuration item as the type field of the target configuration item;
Generating a target setting code based on the respective native identification fields, the respective type fields, and a second correspondence between the respective type fields and the native identification fields;
the parsing the target setting code to obtain a native identification field includes:
analyzing the setting code to obtain each original identification field, each type field and the second corresponding relation;
The determining the memory address corresponding to the target native identifier represented by the native identifier field based on the identifier correspondence, and processing the information stored in the memory address includes:
And determining a type field corresponding to the native identification field according to the second corresponding relation, determining a memory address corresponding to the target native identification represented by the native identification field based on the identification corresponding relation, and processing information stored in the memory address according to a processing mode corresponding to the type field.
11. A device configuration apparatus, for application to a master device, the apparatus comprising:
The device comprises an identification module, a configuration operation module and a memory address module, wherein the identification module is used for responding to the configuration operation aiming at target equipment and identifying each target configuration item aimed at by the configuration operation, wherein the target equipment maintains a primary corresponding relation in advance, an identification corresponding relation between each configuration item and each primary identification is established in advance, and an address corresponding relation between each primary identification and the memory address is established in advance, and the primary identification is used in the primary corresponding relation of the target equipment;
The acquisition module is used for determining a native identifier corresponding to each target configuration item based on the identifier corresponding relation and taking the native identifier as a target native identifier corresponding to the target configuration item;
the generation module is used for generating a native identification field for representing a target native identification corresponding to each target configuration item as a native identification field corresponding to the target configuration item;
The display module is used for displaying the setting codes used for representing the original identification fields, so that the target equipment scans and analyzes the setting codes to obtain the original identification fields, and for each original identification field, a memory address corresponding to the target original identification represented by the original identification field is determined based on the identification corresponding relation, and information stored in the memory address is processed.
12. A device configuration apparatus for application to a target device, the apparatus comprising:
The scanning module is used for scanning the target setting code; wherein the target setting code is obtained based on the following manner: in response to a configuration operation aiming at target equipment, identifying each target configuration item aimed at by the configuration operation, wherein the target equipment maintains a native correspondence in advance, an identification correspondence between each configuration item and each native identification is established in advance, and an address correspondence between each native identification and a memory address is established in advance, and the native identification is an identification used in the native correspondence of the target equipment; for each target configuration item, determining a native identifier corresponding to the target configuration item based on the identifier correspondence, and taking the native identifier as a target native identifier corresponding to the target configuration item; generating a primary identification field for representing a target primary identification corresponding to the target configuration item as a primary identification field corresponding to the target configuration item for each target configuration item, and generating a target setting code based on each primary identification field;
the analysis module is used for analyzing the target setting code to obtain each original identification field;
The configuration module is used for determining a memory address corresponding to the target native identifier represented by the native identifier field based on the identifier correspondence for each native identifier field, and processing information stored in the memory address.
13. An electronic device, comprising:
a memory for storing a computer program;
a processor for implementing the method of any one of claims 1-7 or 8-10 when executing a program stored on a memory.
14. A computer readable storage medium, characterized in that the computer readable storage medium has stored therein a computer program which, when executed by a processor, implements the method of any of claims 1-7 or 8-10.
CN202410215076.XA 2024-02-27 2024-02-27 Equipment configuration method and device Pending CN118113629A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202410215076.XA CN118113629A (en) 2024-02-27 2024-02-27 Equipment configuration method and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202410215076.XA CN118113629A (en) 2024-02-27 2024-02-27 Equipment configuration method and device

Publications (1)

Publication Number Publication Date
CN118113629A true CN118113629A (en) 2024-05-31

Family

ID=91216604

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202410215076.XA Pending CN118113629A (en) 2024-02-27 2024-02-27 Equipment configuration method and device

Country Status (1)

Country Link
CN (1) CN118113629A (en)

Similar Documents

Publication Publication Date Title
CN113065656B (en) Rule engine configuration method and device, server and readable storage medium
CN111045952B (en) Software testing method, flow playback device, terminal equipment and readable storage medium
CN111580884B (en) Configuration updating method, device, server and electronic equipment
CN110554958B (en) Graph database testing method, system, device and storage medium
US8869111B2 (en) Method and system for generating test cases for a software application
CN110188135B (en) File generation method and equipment
CN111144839B (en) Project construction method, continuous integration system and terminal equipment
JP6256115B2 (en) Operation search program, operation search method, and operation search device
CN112729868A (en) Vehicle diagnosis method, device, equipment and medium
CN113407254B (en) Form generation method and device, electronic equipment and storage medium
CN111338716A (en) Data processing method and device based on rule engine and terminal equipment
CN112947907B (en) Method for creating code branches
CN110503504B (en) Information identification method, device and equipment of network product
CN118113629A (en) Equipment configuration method and device
CN113641523B (en) Log processing method and device
CN115002243A (en) Data processing method and device
US11977642B2 (en) Information processing device, information processing method and computer readable medium
CN112068895B (en) Code configuration method, device, video playing equipment and storage medium
CN115208671A (en) Firewall configuration method and device, electronic equipment and storage medium
CN114371866A (en) Version reconfiguration test method, device and equipment of service system
CN113688134A (en) Visual variable management method, system and equipment based on multidimensional data
CN114785847B (en) Network control software development configuration method, terminal and storage medium
CN112114931A (en) Deep learning program configuration method and device, electronic equipment and storage medium
CN109492181B (en) Page jump method, device, computer equipment and storage medium
CN111444057A (en) Page performance data acquisition method and device and computing equipment

Legal Events

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