CN113448958B - Data processing method and device, electronic equipment and storage medium - Google Patents

Data processing method and device, electronic equipment and storage medium Download PDF

Info

Publication number
CN113448958B
CN113448958B CN202010217048.3A CN202010217048A CN113448958B CN 113448958 B CN113448958 B CN 113448958B CN 202010217048 A CN202010217048 A CN 202010217048A CN 113448958 B CN113448958 B CN 113448958B
Authority
CN
China
Prior art keywords
product
current
preset
sequence number
step length
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN202010217048.3A
Other languages
Chinese (zh)
Other versions
CN113448958A (en
Inventor
李玉亮
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Beijing Tongbang Zhuoyi Technology Co ltd
Original Assignee
Beijing Tongbang Zhuoyi Technology Co ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Beijing Tongbang Zhuoyi Technology Co ltd filed Critical Beijing Tongbang Zhuoyi Technology Co ltd
Priority to CN202010217048.3A priority Critical patent/CN113448958B/en
Publication of CN113448958A publication Critical patent/CN113448958A/en
Application granted granted Critical
Publication of CN113448958B publication Critical patent/CN113448958B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/22Indexing; Data structures therefor; Storage structures
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/23Updating
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02DCLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
    • Y02D10/00Energy efficient computing, e.g. low power processors, power management or thermal management

Abstract

The disclosure provides a data processing method and device, an electronic device and a storage medium, comprising: receiving a processing request for numbering a product triggered by a user, acquiring a current serial number of the product according to the processing request, generating a new serial number according to the current serial number and a preset random step length, generating a product number according to the new serial number, current time information and a preset number prefix, and writing the product number into product information of the product.

Description

Data processing method and device, electronic equipment and storage medium
Technical Field
The disclosure relates to the technical field of internet, in particular to the technical field of data processing, and particularly relates to a data processing method and device, electronic equipment and a storage medium.
Background
To distinguish between products (including physical products and software products, etc.), it may be implemented by configuring each product with a unique number (including order number and application number, etc.).
In the prior art, a self-increasing method is mainly adopted to configure unique numbers for all products. If the unique number assigned to the nth product is 0013828, the unique number assigned to each (n+1) th product is 0013829.
However, in implementing the present disclosure, the inventors found that at least the following problems exist: because the unique numbers are sequentially increased, when the unique number of one product is known, the unique numbers of other products can be easily guessed, so that information of the product is revealed.
Disclosure of Invention
The embodiment of the disclosure provides a data processing method and device for improving safety and reliability, electronic equipment and a storage medium.
According to one aspect of the disclosed embodiments, the disclosed embodiments provide a data processing method, the method comprising:
receiving a processing request triggered by a user and used for numbering a product, and acquiring a current serial number of the product according to the processing request;
generating a new serial number according to the current serial number and a preset random step length;
and generating a product number according to the new serial number, the current time information and a preset number prefix, and writing the product number into the product information of the product.
In the embodiment of the disclosure, the new serial number is determined according to the current serial number and the random step length so as to determine the product number later, thereby avoiding product information leakage caused by a self-increasing method in the prior art, improving the safety and reliability of the product information, and realizing the technical effect of the readability of the product number.
In some embodiments, the determining the new sequence number according to the current sequence number and a preset random step size includes:
determining a sum between the random step size and the current sequence number;
and if the sum of the random step length and the current sequence number is smaller than or equal to a preset first threshold value, determining the sum of the random step length and the current sequence number as the new sequence number.
In some embodiments, the method further comprises:
if the sum of the random step length and the current sequence number is larger than the first threshold value, acquiring an updated sequence number from a preset database;
updating the first threshold according to the updated sequence number and a preset buffer step length, and determining the sum of the random step length and the updated sequence number as the new sequence number.
In some embodiments, the processing request carries a serial number name of the product; the step of obtaining the update sequence number from a preset database comprises the following steps:
and acquiring serial numbers corresponding to the number names and the current time information respectively from the database, and determining the acquired serial numbers as the updated serial numbers.
In some embodiments, the first threshold is determined for a preset initial sequence number and a preset buffer step size.
In some embodiments, after the receiving the user-triggered processing request for numbering the product, the method further comprises:
if no record of the serial number exists, a key value is inserted, wherein the key value carries the current time information, a preset serial number name and a preset initial serial number;
the obtaining the current serial number includes: and determining the initial sequence number as the current sequence number.
In another aspect, an embodiment of the present disclosure further provides a data processing method, where the method further includes:
the method comprises the steps that a processor receives a processing request which is triggered by a user and used for numbering a product, and distributes the processing request to a target service instance in a plurality of service instances according to a preset distribution rule;
the target service instance performing the method of any of the embodiments above;
the distribution rules comprise load information distribution rules and/or mapping relation distribution rules of the product and service examples.
In another aspect, an embodiment of the present disclosure further provides a data processing apparatus, including:
the receiving module is used for receiving a processing request triggered by a user and used for numbering the product;
the acquisition module is used for acquiring the current serial number of the product according to the processing request;
the first generation module is used for generating a new serial number according to the current serial number and a preset random step length;
the generating module is used for generating a product number according to the new serial number, the current time information and the preset number prefix, and writing the product number into the product information of the product.
In some embodiments, the first generating module is configured to determine a sum between the random step size and the current sequence number, and if the sum between the random step size and the current sequence number is less than or equal to a preset first threshold, determine the sum between the random step size and the current sequence number as the new sequence number.
In some embodiments, the first generating module is configured to obtain an update sequence number from a preset database if the sum between the random step size and the current sequence number is greater than the first threshold, update the first threshold according to the update sequence number and a preset buffer step size, and determine the sum between the random step size and the update sequence number as the new sequence number.
In some embodiments, the processing request carries a serial number name of the product; the first generation module is configured to obtain serial numbers corresponding to the number name and the current time information from the database, and determine the obtained serial numbers as the updated serial numbers.
In some embodiments, the first threshold is determined for a preset initial sequence number and a preset buffer step size.
In some embodiments, the apparatus further comprises:
the inserting module is used for inserting a key value if no record of the serial number exists, wherein the key value carries the current time information, a preset serial number name and a preset initial serial number;
and the acquisition module is used for determining the initial sequence number as the current sequence number.
In another aspect, an embodiment of the present disclosure further provides a data processing apparatus, the apparatus further including:
the processor is used for receiving a processing request which is triggered by a user and used for numbering the product, and distributing the processing request to a target service instance in a plurality of service instances according to a preset distribution rule;
the target service instance being configured to perform the method according to any of the embodiments above;
the distribution rules comprise load information distribution rules and/or mapping relation distribution rules of the product and service examples.
In another aspect, an embodiment of the present disclosure further provides an electronic device, including: a memory, a processor;
the memory is used for storing the processor executable instructions;
wherein the processor, when executing the instructions in the memory, is configured to implement the method as described in any of the embodiments above.
In another aspect, the disclosed embodiments also provide a computer-readable storage medium having stored therein computer-executable instructions that, when executed by a processor, are configured to implement the method of any of the above embodiments.
In another aspect, an embodiment of the present disclosure further provides a data processing method, including:
responding to a received processing request triggered by a user and used for numbering a product, and acquiring a current serial number of the product;
generating a new serial number according to the current serial number and a preset random step length;
and generating a product number according to the new serial number, the current time information and a preset number prefix.
The present disclosure provides a data processing method and apparatus, an electronic device, and a storage medium, where a new serial number is determined according to a current serial number and a random step size, and a product number is generated by combining current time information and a preset number prefix, so that the generated product number has unpredictability, thereby avoiding product information leakage caused by a self-increasing method in the prior art, improving safety and reliability of product information, and realizing technical effects of readability of the product number.
Drawings
The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the disclosure and together with the description, serve to explain the principles of the disclosure.
Fig. 1 is a schematic diagram of an application scenario in an embodiment of the disclosure;
fig. 2 is a second application scenario diagram of an embodiment of the present disclosure;
FIG. 3 is a flow chart of a data processing method according to an embodiment of the disclosure;
FIG. 4 is a flow chart of another data processing method according to an embodiment of the disclosure;
FIG. 5 is a flow chart of yet another data processing method according to an embodiment of the disclosure;
FIG. 6 is a schematic diagram of a data processing apparatus according to an embodiment of the present disclosure;
FIG. 7 is a schematic diagram of another data processing apparatus according to an embodiment of the present disclosure;
FIG. 8 is a schematic diagram of yet another data processing apparatus according to an embodiment of the present disclosure;
fig. 9 is a schematic structural diagram of an electronic device according to an embodiment of the present disclosure;
fig. 10 is a flowchart illustrating a data processing method according to another embodiment of the disclosure.
Specific embodiments of the present disclosure have been shown by way of the above drawings and will be described in more detail below. These drawings and the written description are not intended to limit the scope of the disclosed concepts in any way, but rather to illustrate the disclosed concepts to those skilled in the art by reference to specific embodiments.
Detailed Description
Reference will now be made in detail to exemplary embodiments, examples of which are illustrated in the accompanying drawings. When the following description refers to the accompanying drawings, the same numbers in different drawings refer to the same or similar elements, unless otherwise indicated. The implementations described in the following exemplary examples are not representative of all implementations consistent with the present disclosure. Rather, they are merely examples of apparatus and methods consistent with some aspects of the present disclosure as detailed in the accompanying claims.
Referring to fig. 1, fig. 1 is a schematic diagram of an application scenario in an embodiment of the disclosure.
In the application scenario shown in fig. 1, the salesman 100 may print out the product number of the commodity 300 on the package box of the commodity 300 using the coding machine 200 (i.e., the data processing apparatus).
The coding machine 200 determines the product number of the commodity 300 by adopting the data processing method of the embodiment of the disclosure.
Referring to fig. 2, fig. 2 is a schematic diagram of an application scenario in an embodiment of the disclosure.
In the application scenario as shown in fig. 2, the user 400 may use the computer 500 (i.e., the data processing apparatus) to determine the product number of the software product (not shown in the figure), and write the determined product number into the product information of the software product.
Fig. 1 may be understood as an application scenario for data processing of an entity product, and fig. 2 may be understood as an application scenario for data processing of a software product.
Illustratively, the above two examples exemplarily describe application scenarios of the data processing method of the embodiment of the present disclosure, but should not be construed as limiting the application scenarios of the data processing method of the embodiment of the present disclosure, limiting the data processing apparatus, and so on.
In the related art, a product is numbered mainly by two data methods, so that the product number of the product is obtained. One of the methods is a self-increasing method, which is to add a fixed value on the basis of the previous product number when the current product number needs to be determined. However, by the self-increasing method, since the product numbers are sequentially increased, when the product number of a certain product is known, the product numbers of other products may be easily guessed, thereby causing information leakage of the products. Another method is a universally unique identification code (Universally Unique Identifier, UUID) random type method. However, the readability by the UUID random type method is poor.
In order to solve the problems existing in the related art, the inventors have devised an inventive concept of a data processing method of an embodiment of the present disclosure after having performed creative work: a method is conceived that does not easily cause information leakage of a product and does not cause poor readability of a product number.
The following describes the technical solutions of the present disclosure and how the technical solutions of the present application solve the above technical problems in detail with specific embodiments. The following embodiments may be combined with each other, and the same or similar concepts or processes may not be described in detail in some embodiments. Embodiments of the present disclosure will be described below with reference to the accompanying drawings.
Referring to fig. 3, fig. 3 is a flow chart illustrating a data processing method according to an embodiment of the disclosure.
As shown in fig. 3, the method includes:
s101: and receiving a processing request which is triggered by a user and used for numbering the product, and acquiring the current serial number of the product according to the processing request.
The execution subject of the data processing method of the embodiment of the present disclosure may be a data processing device, including but not limited to a server, a computer, a code spraying machine, a code printing machine, a computer, a notebook, an iPad, and a mobile phone.
In the application scenario shown in fig. 1, the data processing device may be a coding machine. In the application scenario as shown in fig. 2, the data processing device may be a computer. That is, the data processing apparatus may not perform the same in different application scenarios.
The products comprise solid products and non-solid products, wherein the solid products are used for representing products with product forms, such as various devices, various foods, various toys and the like, and the non-solid products are used for representing products without specific forms, such as software products, service products, monetary fund products and the like.
In the application scenario shown in fig. 1, the user may trigger a processing request for numbering the commodity by pressing a "start button" provided on the coding machine.
And when the coding machine receives the processing request, acquiring the current serial number. Wherein the current serial number is used to characterize the currently existing serial number, i.e., the current serial number has been printed on other merchandise by the transcoder.
S102: and generating a new serial number according to the current serial number and a preset random step length.
Wherein a random step size is used to characterize the span between two sequence numbers. The size of the random step may be set based on demand, experience, experimentation, etc., for example, the random step is 40.
S103: and generating a product number according to the new serial number, the current time information and the preset number prefix, and writing the product number into the product information of the product.
Wherein the current time information is used to characterize the current time.
The number prefix is used for representing the prefix of the product and can be used for distinguishing the product.
In some embodiments, if the new serial number is 10040, the current time information is 20191212, the number prefix is SEQ, the generated product number may be SEQ2019121200010040.
Based on the above analysis, the embodiment of the disclosure provides a data processing method, which includes: receiving a processing request for numbering a product triggered by a user, acquiring a current serial number of the product according to the processing request, generating a new serial number according to the current serial number and a preset random step length, generating a product number according to the new serial number, current time information and a preset number prefix, and writing the product number into product information of the product.
Referring to fig. 4, fig. 4 is a flowchart illustrating another data processing method according to an embodiment of the disclosure.
As shown in fig. 4, the method includes:
s201: and receiving a processing request which is triggered by a user and used for numbering the product.
The description of S201 may be referred to the above example, and will not be repeated here.
S202: judging whether a record of the serial number exists, if so, executing S203; if not, S204 is performed.
In the step, the method is equivalent to judging whether the product is numbered for the first time, and if the product is numbered for the first time, no record of the serial number exists, namely no serial number exists; if the product is not numbered for the first time, there is a record of the serial number, i.e. there is a serial number.
S203: the current sequence number is acquired and S206 is performed.
Based on the above example, if the product is not numbered for the first time, there is a record of the serial number, i.e., there is a serial number. The nearest one is selected to be determined as the current one, i.e. the one corresponding to the last time the product was numbered is selected.
S204: and inserting a key value, wherein the key value carries current time information, a preset number name and a preset initial serial number.
In this step, if the current time information is 20191212, the number name is TEST, and the initial serial number is 10000, the key in the key value may be TEST-20191212, and the value in the key value may be 10000.
In some embodiments, the key value may further carry a preset cache step, for example, the cache step is 100, and the value in the key value may be 10000+100=10100.
S205: the initial sequence number is determined as the current sequence number, and S206 is performed.
S206: and determining the sum between the preset random step length and the current serial number.
For example, if the random step size is 40 and the current sequence number is 10000, the sum between the random step size and the current sequence=40+10000=10040.
As another example, if the random step size is 36 and the current sequence number is 10085, the sum between the random step size and the current sequence=36+10085=10121.
S207: judging the size between the sum of the random step length and the current sequence and the first threshold value, and executing S208 if the sum of the random step length and the current sequence is smaller than or equal to the first threshold value; if the sum between the random step and the current sequence is greater than the first threshold, S209 is performed.
The first threshold is determined according to the initial sequence number and the buffer step size.
Based on the above example, the first threshold=10000+100=10100.
S208: the sum between the random step size and the current sequence number is determined as a new sequence number, and S213 is performed.
Based on the above example, when the sum between the random step size and the current sequence is 10040, which is less than 10100, then 10040 is determined as the new sequence number.
S209: and acquiring serial numbers corresponding to the serial numbers and the current time information respectively from the database.
Based on the above example, when the sum between the random step size and the current sequence is =10121, greater than 10100, then the update sequence number may be determined from the database to avoid duplication of product numbers determined by multiple data processing devices sharing the same database.
That is, the key may be selected according to the key in the key value: TEST-20191212 obtains the corresponding serial number from the database.
S210: and determining the acquired serial number as an updated serial number.
For example, if the acquired serial number is 10100, 10100 is determined as the update serial number.
S211: and updating the first threshold according to the update sequence number and the buffer step size.
Based on the above example, if the acquired sequence number is 10100 and the buffer step size is 100, the first threshold=10100+100=10200.
S212: the sum of the random step size and the updated sequence number is determined as the new sequence number.
And based on the above example, if the random step size is 36, when the update sequence number is 10100, the sum between the random step size and the current sequence=36+10100= 10136.
S213: and generating a product number according to the new serial number, the current time information and the preset number prefix, and writing the product number into the product information of the product.
The description of S213 may refer to S103, and will not be repeated here.
Referring to fig. 5, fig. 5 is an interaction diagram of a data processing method according to an embodiment of the disclosure.
As shown in fig. 5, the method includes:
s301: the user initiates a processing request to the processor to number the product.
S302: the processor then determines a target service instance corresponding to the processing request from the plurality of service instances according to a preset allocation rule, wherein the allocation rule comprises a load information allocation rule and/or a mapping relation allocation rule of the product and the service instance.
Wherein the plurality of service instances may be understood as a plurality of servers; it is also understood that multiple parallel threads in a server may run independently of each other.
In this step, when the processor receives the processing request, load information of each service instance may be collected, where the load information is used to characterize workload of each service instance, and the processing request is distributed according to the load information of each service instance to a target service instance, where the target service instance is one of multiple service instances and is a service instance for executing the processing request.
Specifically, the allocation of the processing request according to the load information of each service instance may be: and distributing the processing request to the service instance with the minimum load value corresponding to the load information, namely, the target service instance is the service instance with the minimum workload in the plurality of service instances, so that the processing request is executed efficiently.
Of course, in other embodiments, the processing request may be allocated according to a mapping relationship between the product and the service instance. That is, processing requests corresponding to different products may be performed by different service instances.
Illustratively, the "different products" may be understood from a slightly macroscopic perspective, and as described in the above examples, the products may be divided into physical products and non-physical products according to whether the products are physical products, the physical products may include equipment-type products and food-type products, etc., and the non-physical products may include software-type products and money-type products, etc. Of course, the "different products" may also be understood from a slightly microscopic perspective, such as processor-type products, cookie-type products, beverage-type products, game software-type products, and electronic map-type products, among others.
Specifically, if there are five service instances, one of which is used for processing the product number of the product of the game software type, when the product corresponding to the processing request is the product of the game software type, the processor distributes the processing request to the service instance for processing the product number of the product of the game software type, and the service instance is the target service instance.
S303: the processor then sends the processing request to the target service instance.
S304: and the target service instance acquires the current serial number of the product according to the processing request.
The description of S304 may refer to S101, and will not be repeated here.
S305: and the target service instance generates a new serial number according to the current serial number and a preset random step length.
The description of S305 may refer to S102, and will not be repeated here.
S306: and the target service instance generates a product number according to the new serial number, the current time information and the preset number prefix.
The description of S306 may refer to S103, and will not be repeated here.
S307: the target service instance writes the product number into the product information of the product.
Of course, in other embodiments, when the target service instance receives the processing request, the methods described in S201 to S213 may be performed, as shown in fig. 4.
According to another aspect of the disclosed embodiments, the disclosed embodiments also provide a data processing apparatus.
Referring to fig. 6, fig. 6 is a schematic diagram of a data processing apparatus according to an embodiment of the disclosure.
As shown in fig. 6, the apparatus includes:
a receiving module 11, configured to receive a processing request triggered by a user and used for numbering a product;
an obtaining module 12, configured to obtain a current serial number of the product according to the processing request;
a first generating module 13, configured to generate a new sequence number according to the current sequence number and a preset random step size;
the second generation module 14 is configured to generate a product number according to the new serial number, the current time information, and a preset number prefix, and write the product number into product information of the product.
In some embodiments, the first generating module 13 is configured to determine a sum between the random step size and the current sequence number, and if the sum between the random step size and the current sequence number is less than or equal to a preset first threshold, determine the sum between the random step size and the current sequence number as the new sequence number.
In some embodiments, the first generating module 13 is configured to obtain an updated sequence number from a preset database if the sum between the random step size and the current sequence number is greater than the first threshold, update the first threshold according to the updated sequence number and a preset buffer step size, and determine the sum between the random step size and the updated sequence number as the new sequence number.
In some embodiments, the processing request carries a serial number name of the product; the first generating module 13 is configured to obtain, from the database, a serial number corresponding to the number name and the current time information, and determine the obtained serial number as the update serial number.
In some embodiments, the first threshold is determined for a preset initial sequence number and a preset buffer step size.
As can be seen in conjunction with fig. 7, in some embodiments, the apparatus further comprises:
the inserting module 15 inserts a key value if no record of the serial number exists, wherein the key value carries the current time information, a preset serial number name and a preset initial serial number;
and the obtaining module 12 is configured to determine the initial sequence number as the current sequence number.
In another aspect, an embodiment of the present disclosure further provides a data processing apparatus, the apparatus further including:
the processor is used for receiving a processing request which is triggered by a user and used for numbering the product, and distributing the processing request to a target service instance in a plurality of service instances according to a preset distribution rule;
the target service instance being configured to perform the method according to any of the embodiments above;
the distribution rules comprise load information distribution rules and/or mapping relation distribution rules of the product and service examples.
Referring to fig. 8, fig. 8 is a schematic diagram of a data processing apparatus according to another embodiment of the disclosure.
As shown in fig. 8, the data processing apparatus includes N service instances, each of which may include a computing unit and a memory. The calculating unit may specifically perform product numbering, and the memory may specifically store the current serial number, the first threshold, the buffer step size, the key value, and the like.
Wherein each service instance may be coupled to the processor, and wherein the processor may be specifically coupled to the computing unit in each service instance. The processor obtains the load information of each service instance, so that when the processor receives the processing request, the service instance (i.e. the target service instance) for executing the processing request is determined from the N service instances according to the load information of each computing unit.
Of course, based on the above example, the processor may also allocate the processing request to the corresponding service instance, and in particular to the corresponding computing unit, based on a preset mapping relationship of the product and the service instance.
Wherein each service instance may be connected to a database, and the database may be connected specifically by a computing unit in each service instance. Based on the above example, when the sum between the random step size and the current sequence number is greater than the first threshold, the updated sequence number may be obtained from the database.
According to another aspect of the embodiments of the present disclosure, there is also provided an electronic device including: a memory, a processor;
the memory is used for storing the processor executable instructions;
wherein the processor, when executing the instructions in the memory, is configured to implement the method as described in any of the embodiments above.
Referring to fig. 9, fig. 9 is a schematic structural diagram of an electronic device according to an embodiment of the disclosure.
As shown in fig. 9, the electronic device includes a memory and a processor, and may further include a communication interface and a bus, wherein the processor, the communication interface, and the memory are connected by the bus; the processor is configured to execute executable modules, such as computer programs, stored in the memory.
The memory may include a high-speed random access memory (RAM, random Access Memory), and may further include a non-volatile memory (non-volatile memory), such as at least one magnetic disk memory. Communication connection between the system network element and at least one other network element is achieved through at least one communication interface, which may be wired or wireless, and the internet, wide area network, local network, metropolitan area network, etc. may be used.
The bus may be an ISA bus, a PCI bus, an EISA bus, or the like. The buses may be divided into address buses, data buses, control buses, etc.
The memory is used for storing a program, and the processor executes the program after receiving an execution instruction, so that the method disclosed in any embodiment of the foregoing disclosure may be applied to the processor or implemented by the processor.
The processor may be an integrated circuit chip having signal processing capabilities. In implementation, the steps of the above method may be performed by integrated logic circuits of hardware in a processor or by instructions in the form of software. The processor may be a general-purpose processor, including a central processing unit (Central Processing Unit, CPU for short), a network processor (Network Processor, NP for short), etc.; but may also be a digital signal processor (Digital SignalProcessing, DSP for short), application specific integrated circuit (Application Specific Integrated Circuit, ASIC for short), off-the-shelf programmable gate array (Field-Programmable Gate Array, FPGA for short), or other programmable logic device, discrete gate or transistor logic device, discrete hardware components. The steps of a method disclosed in connection with the embodiments of the present disclosure may be embodied directly in hardware, in a decoded processor, or in a combination of hardware and software modules in a decoded processor. The software modules may be located in a random access memory, flash memory, read only memory, programmable read only memory, or electrically erasable programmable memory, registers, etc. as well known in the art. The storage medium is located in a memory, and the processor reads the information in the memory and, in combination with its hardware, performs the steps of the above method.
According to another aspect of the disclosed embodiments, the disclosed embodiments also provide a computer-readable storage medium having stored therein computer-executable instructions that, when executed by a processor, are configured to implement a method as described in any of the above embodiments.
According to another aspect of the disclosed embodiments, the disclosed embodiments also provide a data processing method.
Referring to fig. 10, fig. 10 is a flowchart illustrating a data processing method according to another embodiment of the disclosure.
As shown in fig. 10, the method includes:
s1: responding to a received processing request triggered by a user and used for numbering a product, and acquiring a current serial number of the product;
s2: generating a new serial number according to the current serial number and a preset random step length;
s3: and generating a product number according to the new serial number, the current time information and a preset number prefix.
The reader will appreciate that in the description of this specification, a description of terms "one embodiment," "some embodiments," "an example," "a particular example," or "some examples," etc., means that a particular feature, structure, or characteristic described in connection with the embodiment or example is included in at least one embodiment or example of the present disclosure. In this specification, schematic representations of the above terms are not necessarily directed to the same embodiment or example. Furthermore, the particular features, structures, or characteristics described may be combined in any suitable manner in any one or more embodiments or examples. Furthermore, the different embodiments or examples described in this specification and the features of the different embodiments or examples may be combined and combined by those skilled in the art without contradiction.
It will be clear to those skilled in the art that, for convenience and brevity of description, specific working procedures of the apparatus and units described above may refer to corresponding procedures in the foregoing method embodiments, which are not described herein again.
In the several embodiments provided in this application, it should be understood that the disclosed apparatus and method may be implemented in other ways. For example, the apparatus embodiments described above are merely illustrative, e.g., the division of elements is merely a logical functional division, and there may be additional divisions of actual implementation, e.g., multiple elements or components may be combined or integrated into another system, or some features may be omitted, or not performed.
The units described as separate units may or may not be physically separate, and units shown as units may or may not be physical units, may be located in one place, or may be distributed over a plurality of network units. Some or all of the units may be selected according to actual needs to achieve the purposes of the embodiments of the present disclosure.
In addition, each functional unit in each embodiment of the present disclosure may be integrated in one processing unit, or each unit may exist alone physically, or two or more units may be integrated in one unit. The integrated units may be implemented in hardware or in software functional units.
The integrated units, if implemented in the form of software functional units and sold or used as stand-alone products, may be stored in a computer readable storage medium. Based on such understanding, the technical solution of the present disclosure is essentially or a part contributing to the prior art, or all or part of the technical solution may be embodied in the form of a software product stored in a storage medium, including several instructions to cause a computer device (which may be a personal computer, a server, or a network device, etc.) to perform all or part of the steps of the methods of the embodiments of the present disclosure. And the aforementioned storage medium includes: a U-disk, a removable hard disk, a Read-Only Memory (ROM), a random access Memory (RAM, random Access Memory), a magnetic disk, or an optical disk, or other various media capable of storing program codes.
It should also be understood that, in the embodiments of the present disclosure, the sequence number of each process described above does not mean that the execution sequence of each process should be determined by the function and the internal logic of each process, and should not constitute any limitation on the implementation process of the embodiments of the present disclosure.
The foregoing is merely a specific embodiment of the present disclosure, but the protection scope of the present disclosure is not limited thereto, and any equivalent modifications or substitutions will be apparent to those skilled in the art within the scope of the present disclosure, and these modifications or substitutions should be covered in the scope of the present disclosure. Therefore, the protection scope of the present disclosure shall be subject to the protection scope of the claims.

Claims (8)

1. A method of data processing, the method comprising:
receiving a processing request triggered by a user and used for numbering a product, and acquiring a current serial number of the product according to the processing request, wherein the processing request carries the numbering name of the product;
generating a new sequence number according to the current sequence number and a preset random step length, wherein the random step length is used for representing the span between the two sequence numbers;
generating a product number according to the new serial number, the current time information and a preset number prefix, and writing the product number into the product information of the product;
the step of determining a new sequence number according to the current sequence number and a preset random step length comprises the following steps:
determining a sum between the random step size and the current sequence number;
if the sum of the random step length and the current sequence number is smaller than or equal to a preset first threshold value, determining the sum of the random step length and the current sequence number as the new sequence number;
if the sum of the random step length and the current sequence number is larger than the first threshold value, acquiring sequence numbers corresponding to the number names and the current time information from a database, determining the acquired sequence numbers as updated sequence numbers, updating the first threshold value according to the updated sequence numbers and a preset buffer step length, and determining the sum of the random step length and the updated sequence numbers as the new sequence numbers.
2. The method of claim 1, wherein after the receiving the user-triggered processing request for numbering the product, the method further comprises:
if no record of the serial number exists, a key value is inserted, wherein the key value carries the current time information, a preset serial number name and a preset initial serial number;
the obtaining the current serial number includes: and determining the initial sequence number as the current sequence number.
3. A method of data processing, the method comprising:
the method comprises the steps that a processor receives a processing request which is triggered by a user and used for numbering a product, and distributes the processing request to a target service instance in a plurality of service instances according to a preset distribution rule;
the target service instance performing the method of claim 1 or 2;
the distribution rules comprise load information distribution rules and/or mapping relation distribution rules of the product and service examples.
4. A data processing apparatus, the apparatus comprising:
the receiving module is used for receiving a processing request triggered by a user and used for numbering the product;
the acquisition module is used for acquiring the current serial number of the product according to the processing request, wherein the processing request carries the serial number name of the product;
the first generation module is used for generating a new sequence number according to the current sequence number and a preset random step length, wherein the random step length is used for representing the span between the two sequence numbers;
the second generation module is used for generating a product number according to the new serial number, the current time information and a preset number prefix, and writing the product number into the product information of the product;
the first generation module is specifically configured to:
determining a sum between the random step size and the current sequence number;
if the sum of the random step length and the current sequence number is smaller than or equal to a preset first threshold value, determining the sum of the random step length and the current sequence number as the new sequence number;
if the sum of the random step length and the current sequence number is larger than the first threshold value, acquiring sequence numbers corresponding to the number names and the current time information from a database, determining the acquired sequence numbers as updated sequence numbers, updating the first threshold value according to the updated sequence numbers and a preset buffer step length, and determining the sum of the random step length and the updated sequence numbers as the new sequence numbers.
5. A data processing apparatus, the apparatus comprising:
the processor is used for receiving a processing request which is triggered by a user and used for numbering the product, and distributing the processing request to a target service instance in a plurality of service instances according to a preset distribution rule;
the target service instance for performing the method of claim 1 or 2;
the distribution rules comprise load information distribution rules and/or mapping relation distribution rules of the product and service examples.
6. An electronic device, comprising: a memory, a processor;
the memory is used for storing the processor executable instructions;
wherein the processor, when executing the instructions in the memory, is configured to implement the method of claim 1 or 2.
7. A computer readable storage medium having stored therein computer executable instructions which when executed by a processor are adapted to carry out the method of claim 1 or 2.
8. A method of data processing, the method comprising:
responding to a received processing request triggered by a user and used for numbering a product, acquiring a current serial number of the product, wherein the processing request carries the numbering name of the product;
generating a new sequence number according to the current sequence number and a preset random step length, wherein the random step length is used for representing the span between the two sequence numbers;
generating a product number according to the new serial number, the current time information and a preset number prefix;
the step of determining a new sequence number according to the current sequence number and a preset random step length comprises the following steps:
determining a sum between the random step size and the current sequence number;
if the sum of the random step length and the current sequence number is smaller than or equal to a preset first threshold value, determining the sum of the random step length and the current sequence number as the new sequence number;
if the sum of the random step length and the current sequence number is larger than the first threshold value, acquiring sequence numbers corresponding to the number names and the current time information from a database, determining the acquired sequence numbers as updated sequence numbers, updating the first threshold value according to the updated sequence numbers and a preset buffer step length, and determining the sum of the random step length and the updated sequence numbers as the new sequence numbers.
CN202010217048.3A 2020-03-25 2020-03-25 Data processing method and device, electronic equipment and storage medium Active CN113448958B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202010217048.3A CN113448958B (en) 2020-03-25 2020-03-25 Data processing method and device, electronic equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202010217048.3A CN113448958B (en) 2020-03-25 2020-03-25 Data processing method and device, electronic equipment and storage medium

Publications (2)

Publication Number Publication Date
CN113448958A CN113448958A (en) 2021-09-28
CN113448958B true CN113448958B (en) 2024-01-12

Family

ID=77806777

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202010217048.3A Active CN113448958B (en) 2020-03-25 2020-03-25 Data processing method and device, electronic equipment and storage medium

Country Status (1)

Country Link
CN (1) CN113448958B (en)

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108134824A (en) * 2017-12-19 2018-06-08 深圳马可孛罗科技有限公司 A kind of travel products running log recording method and system
CN108399459A (en) * 2018-01-19 2018-08-14 国网福建省电力有限公司 Equipment updates forecast system
CN110162293A (en) * 2019-05-10 2019-08-23 上海紫翊网络科技有限公司 A kind of random number generation method, device and terminal for equally loaded
CN110263565A (en) * 2019-06-28 2019-09-20 北京百度网讯科技有限公司 Method and apparatus for calling service
CN110555078A (en) * 2019-09-02 2019-12-10 上海摩库数据技术有限公司 Distributed ID generation
CN110619114A (en) * 2019-09-26 2019-12-27 北京明略软件系统有限公司 Serial number generation method and system

Family Cites Families (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US9811824B2 (en) * 2013-07-24 2017-11-07 Adobe Systems Incorporated Method and apparatus for version independent point of sale activation (POSA) product download
US10540369B2 (en) * 2016-12-19 2020-01-21 Salesforce.Com, Inc. Org sync suspend and resume data sync

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108134824A (en) * 2017-12-19 2018-06-08 深圳马可孛罗科技有限公司 A kind of travel products running log recording method and system
CN108399459A (en) * 2018-01-19 2018-08-14 国网福建省电力有限公司 Equipment updates forecast system
CN110162293A (en) * 2019-05-10 2019-08-23 上海紫翊网络科技有限公司 A kind of random number generation method, device and terminal for equally loaded
CN110263565A (en) * 2019-06-28 2019-09-20 北京百度网讯科技有限公司 Method and apparatus for calling service
CN110555078A (en) * 2019-09-02 2019-12-10 上海摩库数据技术有限公司 Distributed ID generation
CN110619114A (en) * 2019-09-26 2019-12-27 北京明略软件系统有限公司 Serial number generation method and system

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
Distributed execution of continuous queries;Rajeev Gupta 等;《2014 IEEE 30th International Conference on Data Engineering》;1306-1309 *
基于多功能车辆总线(MVB)的消息数据传输协议;于晓娜 deng;《铁路通信信号工程技术》;22-25 *

Also Published As

Publication number Publication date
CN113448958A (en) 2021-09-28

Similar Documents

Publication Publication Date Title
CN111090628B (en) Data processing method and device, storage medium and electronic equipment
US11568092B2 (en) Method of dynamically configuring FPGA and network security device
CN111984400A (en) Memory allocation method and device of neural network
CN104461698A (en) Dynamic virtual disk mounting method, virtual disk management device and distributed storage system
CN112835528A (en) Dirty page refreshing method and device, electronic equipment and storage medium
CN114556309A (en) Memory space allocation method and device and storage medium
US8751724B2 (en) Dynamic memory reconfiguration to delay performance overhead
CN110555014B (en) Data migration method and system, electronic device and storage medium
CN111803917A (en) Resource processing method and device
CN112650692A (en) Heap memory allocation method, device and storage medium
CN110955545A (en) Data integrity checking method, system and related equipment
CN113448958B (en) Data processing method and device, electronic equipment and storage medium
CN105988871B (en) Remote memory allocation method, device and system
CN111381905B (en) Program processing method, device and equipment
CN112269665B (en) Memory processing method and device, electronic equipment and storage medium
CN110879748A (en) Shared resource allocation method, device and equipment
CN113849311B (en) Memory space management method, device, computer equipment and storage medium
CN116028455A (en) Data processing method and device, storage medium and electronic equipment
CN111435323A (en) Information transmission method, device, terminal, server and storage medium
CN115269199A (en) Data processing method and device, electronic equipment and computer readable storage medium
CN114697440B (en) Network management method and mobile terminal
CN111708715B (en) Memory allocation method, memory allocation device and terminal equipment
CN112434237A (en) Page loading method and device, electronic equipment and storage medium
CN113961302A (en) Resource allocation method, device, electronic equipment and storage medium
CN107273188B (en) Virtual machine Central Processing Unit (CPU) binding method and device

Legal Events

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