A communication optimization method, device, equipment and medium for flexible equipment

By obtaining the handshake timing design information and communication process of flexible equipment, building communication threads for simulation and optimization, solving the problem of response delay in the initialization of flexible equipment, and achieving a more efficient communication process.

CN119203601BActive Publication Date: 2025-04-01STATE GRID ZHEJIANG ELECTRIC POWER CO LTD HANGZHOU POWER SUPPLY CO +1
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202411650576.2
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-11-19
Publication Date
2025-04-01
Estimated Expiration
2044-11-19

AI Technical Summary

Technical Problem

The flexible device may not have completed the necessary initialization during the initialization process, resulting in the inability to respond to communication requests in time, and requires multiple requests to be sent, which increases the communication burden and data volume, affects the communication time between devices and the normal use of devices.

Method used

By obtaining the handshake timing design information of the flexible device during the power-on initialization stage, the fields required for communication are determined, and these fields are filtered based on the communication process and protocol, the communication thread is built to simulate and simulation parameters are obtained. If the simulation parameters do not meet the preset range, the communication thread is adaptively adjusted according to the network conditions to optimize the communication process.

Benefits of technology

The communication steps are simplified, the burden of flexible devices responding to multiple access requests is reduced, the amount and time of communication data are reduced, and the communication efficiency is improved.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119203601B_ABST
    Figure CN119203601B_ABST
Patent Text Reader

Abstract

The present invention discloses a communication optimization method, device, equipment and medium for a flexible device, the method comprising: obtaining handshake timing design information of the flexible device in the power-on initialization phase, and determining the fields required for the flexible device communication from the handshake timing design information to obtain the communication fields; filtering and processing the communication fields based on the communication process and communication protocol of the flexible device to obtain the necessary fields of the communication process; after constructing the communication thread of the flexible device based on the necessary fields, using the communication thread to perform communication simulation and obtain the parameters of the simulation process to obtain the simulation parameters; if the value of the simulation parameter does not meet the preset value range, the communication thread is adaptively adjusted according to the network status of the flexible device to obtain the communication optimization information of the flexible device, so as to optimize the flexible device using the communication optimization information. The present invention simplifies the communication steps to reduce the amount of communication data, shorten the communication time between devices, and improve the communication efficiency.
Need to check novelty before this filing date? Find Prior Art

Description

Background Art

[0002] Flexible devices built using flexible electronic technology (such as foldable screens or curved displays) have greater flexibility than traditional electronic devices, and can adapt to different working environments to a certain extent and meet the deformation requirements of the device.

[0003] As users' application demands continue to increase, the number of flexible devices has also increased dramatically. In order to quickly communicate with different flexible devices, the current commonly used method is to install a communication connection interface in the flexible device, and trigger the communication connection by sending a request to the interface with its own communication handshake protocol. After the handshake is established, the communication connection is completed, thereby ensuring secure communication and data sharing between devices.

[0004] However, the commonly used methods currently have the following technical problems: general communication is to send a request immediately after accessing the interface, while the flexible device may not have completed the necessary initialization and cannot respond in time, and thus needs to send requests multiple times. As a result, the flexible device may need to respond to multiple access requests at the same time after completing initialization, so that the flexible device needs to repeatedly perform processing such as response confirmation and parameter configuration, which not only increases the amount of communication data and affects the communication time between devices, but also increases the burden on the flexible device and affects the normal use of the device. Summary of the invention

[0005] The present invention proposes a communication optimization method, device, equipment and medium for a flexible device, wherein the method can solve the technical problem of cumbersome communication process of the flexible device to optimize the communication process.

[0006] A first aspect of an embodiment of the present invention provides a communication optimization method for a flexible device, the method comprising:

[0007] Acquire handshake timing design information of the flexible device in the power-on initialization phase, and determine the fields required for the flexible device communication from the handshake timing design information to obtain the communication field;

[0008] The communication fields are screened and processed based on the communication process and communication protocol of the flexible device to obtain necessary fields of the communication process;

[0009] After constructing the communication thread of the flexible device based on the necessary fields, the communication thread is used to perform communication simulation and obtain parameters of the simulation process to obtain simulation parameters, wherein the communication thread includes a thread of the flexible device in the handshake request phase and a thread of the flexible device in the parameter configuration phase;

[0010] If the value of the simulation parameter does not satisfy the preset value range, the communication thread is adaptively adjusted according to the network status of the flexible device to obtain communication optimization information of the flexible device, so as to optimize the flexible device using the communication optimization information.

[0011] In combination with the first aspect, in one implementation, the obtaining of handshake timing design information of the flexible device in the power-on initialization phase, and determining the fields required for the flexible device communication from the handshake timing design information to obtain the communication field includes:

[0012] After obtaining handshake timing design information of the flexible device during the power-on initialization phase of the flexible device, modeling and analyzing the handshake timing design information according to the communication process of the flexible device to obtain a timing field;

[0013] Performing address increment scanning on the timing field according to the device address allocation table of the flexible device to obtain the device identifier and physical address information of the flexible device;

[0014] Acquire the real-time status of the device identifier flexible device, and if the status field corresponding to the real-time status conflicts with the field of the physical address information, reallocate the physical address information;

[0015] If the status field corresponding to the real-time status conflicts with the field of the physical address information, the field of the physical address information is recorded to obtain the communication field.

[0016] In combination with the first aspect, in one implementation, the communication process and communication protocol based on the flexible device screen the communication fields to obtain necessary fields of the communication process, including:

[0017] Read the message corresponding to the communication process and communication protocol of the flexible device to obtain the device identification field;

[0018] Performing Huffman coding compression processing on the device identification field to obtain a compressed field;

[0019] The identification bit of the device communication is extracted from the compressed field, and the corresponding field is filtered from the communication field according to the identification bit to obtain the necessary fields of the communication process.

[0020] In combination with the first aspect, in one implementation, after constructing the communication thread of the flexible device based on the necessary fields, using the communication thread to perform communication simulation and obtain parameters of the simulation process to obtain simulation parameters, including:

[0021] Extracting the fields corresponding to the handshake request phase and the fields corresponding to the parameter configuration phase from the necessary fields according to the identification bit, to obtain the handshake field and the configuration field;

[0022] The handshake field and the configuration field are used to construct parallel threads to obtain communication threads;

[0023] After communication simulation is performed based on the communication thread, parameters of the simulation process are acquired according to a preset parameter mapping table to obtain simulation parameters.

[0024] In combination with the first aspect, in one implementation, the adaptively adjusting the communication thread according to the network status of the flexible device to obtain the communication optimization information of the flexible device, and optimizing the flexible device using the communication optimization information, includes:

[0025] Determine the network status of the flexible device, and generate a corresponding description field according to the network status;

[0026] Matching the corresponding performance indicator value in a preset data table according to the description field;

[0027] The numerical value of the communication thread is adaptively adjusted according to the performance indicator value to obtain communication optimization information of the flexible device, so as to optimize the flexible device using the communication optimization information.

[0028] In combination with the first aspect, in an implementation manner, after the step of optimizing the flexible device using the communication optimization information, the method further includes:

[0029] Constructing a priority value table and a communication priority value about task priorities according to the service type of the flexible device, and transmitting the priority value table and the communication priority value to the flexible device for comparison by the flexible device;

[0030] When receiving a forwarding task from a flexible device, task processing is performed according to the forwarding task, wherein the forwarding task is a task in which the flexible device determines that the communication priority value is greater than a value in the priority value table.

[0031] In combination with the first aspect, in an implementation manner, after the step of optimizing the flexible device using the communication optimization information, the method further includes:

[0032] The communication bandwidth of the flexible device is determined, and a multi-level cache is established according to the size of the communication bandwidth to store communication handshake requests of different external devices.

[0033] A second aspect of an embodiment of the present invention provides a communication optimization device for a flexible device, the device comprising:

[0034] A field determination module is used to obtain handshake timing design information of the flexible device in the power-on initialization phase, and determine the fields required for the flexible device communication from the handshake timing design information to obtain the communication field;

[0035] A filter field module is used to filter and process the communication fields based on the communication process and communication protocol of the flexible device to obtain necessary fields of the communication process;

[0036] A parameter acquisition module is used to construct a communication thread of the flexible device based on the necessary fields, use the communication thread to perform communication simulation and obtain parameters of the simulation process to obtain simulation parameters, wherein the communication thread includes a thread of the flexible device in the handshake request phase and a thread of the flexible device in the parameter configuration phase;

[0037] The optimization module is used to adaptively adjust the communication thread according to the network status of the flexible device if the value of the simulation parameter does not meet the preset value range, obtain the communication optimization information of the flexible device, and optimize the flexible device using the communication optimization information.

[0038] In combination with the second aspect, in one implementation, the obtaining of handshake timing design information of the flexible device in the power-on initialization phase, and determining the fields required for the flexible device communication from the handshake timing design information to obtain the communication field includes:

[0039] After the flexible device is powered on and initialization phase is completed and handshake timing design information of the flexible device is obtained, modeling and analyzing the handshake timing design information according to the communication process of the flexible device to obtain a timing field;

[0040] Performing address increment scanning on the timing field according to the device address allocation table of the flexible device to obtain the device identifier and physical address information of the flexible device;

[0041] Acquire the real-time status of the device identifier flexible device, and if the status field corresponding to the real-time status conflicts with the field of the physical address information, reallocate the physical address information;

[0042] If the status field corresponding to the real-time status conflicts with the field of the physical address information, the field of the physical address information is recorded to obtain the communication field.

[0043] In conjunction with the second aspect, in one implementation, the communication process and communication protocol based on the flexible device screen the communication fields to obtain necessary fields of the communication process, including:

[0044] Read the message corresponding to the communication process and communication protocol of the flexible device to obtain the device identification field;

[0045] Performing Huffman coding compression processing on the device identification field to obtain a compressed field;

[0046] The identification bit of the device communication is extracted from the compressed field, and the corresponding field is filtered from the communication field according to the identification bit to obtain the necessary fields of the communication process.

[0047] In combination with the second aspect, in one implementation, after constructing the communication thread of the flexible device based on the necessary fields, using the communication thread to perform communication simulation and obtain parameters of the simulation process to obtain simulation parameters, including:

[0048] Extracting the fields corresponding to the handshake request phase and the fields corresponding to the parameter configuration phase from the necessary fields according to the identification bit, to obtain the handshake field and the configuration field;

[0049] The handshake field and the configuration field are used to construct parallel threads to obtain communication threads;

[0050] After communication simulation is performed based on the communication thread, parameters of the simulation process are acquired according to a preset parameter mapping table to obtain simulation parameters.

[0051] In conjunction with the second aspect, in one implementation, the adaptively adjusting the communication thread according to the network status of the flexible device to obtain communication optimization information of the flexible device, and optimizing the flexible device using the communication optimization information, includes:

[0052] Determine the network status of the flexible device, and generate a corresponding description field according to the network status;

[0053] Matching the corresponding performance indicator value in a preset data table according to the description field;

[0054] The numerical value of the communication thread is adaptively adjusted according to the performance indicator value to obtain communication optimization information of the flexible device, so as to optimize the flexible device using the communication optimization information.

[0055] In conjunction with the second aspect, in one implementation, the device further includes:

[0056] a transmission priority module, configured to construct a priority value table for task priorities and a communication priority value according to a service type of the flexible device after the step of optimizing the flexible device by using the communication optimization information, and transmit the priority value table and the communication priority value to the flexible device for comparison by the flexible device;

[0057] The task processing module is used to perform task processing according to the forwarding task when receiving a forwarding task from the flexible device, wherein the forwarding task is a task in which the flexible device determines that the communication priority value is greater than the value in the priority value table.

[0058] In conjunction with the second aspect, in one implementation, the device further includes:

[0059] A cache module is established to determine the communication bandwidth of the flexible device after the step of optimizing the flexible device using the communication optimization information, and to establish a multi-level cache according to the size of the communication bandwidth to store communication handshake requests of different external devices.

[0060] Compared with the prior art, the communication optimization method, device, equipment and medium of a flexible device provided by the embodiment of the present invention have the following beneficial effects: the present invention can obtain the handshake timing design information of the flexible device in the power-on initialization stage, determine the necessary fields of the communication process from the handshake timing design information; construct the communication optimization information of the flexible device based on the necessary fields, and optimize the flexible device using the communication optimization information. By combining the handshake timing design information of the entire communication link and process to construct the communication optimization information, the communication process can be optimized to simplify the communication steps, to avoid the situation where the communication burden is increased due to the flexible device responding to multiple access requests at the same time, to reduce the amount of communication data, to shorten the communication time between devices, and to improve communication efficiency. BRIEF DESCRIPTION OF THE DRAWINGS

[0061] Figure 1 It is a flow chart of a communication optimization method for a flexible device provided by an embodiment of the present invention;

[0062] Figure 2 It is a structural schematic diagram of a communication optimization device for a flexible device provided by an embodiment of the present invention. DETAILED DESCRIPTION

[0063] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.

[0064] Flexible devices built using flexible electronic technology (such as foldable screens or curved displays) have greater flexibility than traditional electronic devices, and can adapt to different working environments to a certain extent and meet the deformation requirements of the device.

[0065] As users' application demands continue to increase, the number of flexible devices has also increased dramatically. In order to quickly communicate with different flexible devices, the current commonly used method is to install a communication connection interface in the flexible device, and trigger the communication connection by sending a request to the interface with its own communication handshake protocol. After the handshake is established, the communication connection is completed, thereby ensuring secure communication and data sharing between devices.

[0066] However, the commonly used methods currently have the following technical problems: general communication is to send a request immediately after accessing the interface, while the flexible device may not have completed the necessary initialization and cannot respond in time, and thus needs to send requests multiple times. As a result, the flexible device may need to respond to multiple access requests at the same time after completing initialization, so that the flexible device needs to repeatedly perform processing such as response confirmation and parameter configuration, which not only increases the amount of communication data and affects the communication time between devices, but also increases the burden on the flexible device and affects the normal use of the device.

[0067] In order to solve the above problems, a communication optimization method, apparatus, device and medium for a flexible device provided in an embodiment of the present application will be introduced and explained in detail through the following specific embodiments.

[0068] Reference Figure 1 , showing a flow chart of a communication optimization method for a flexible device provided by an embodiment of the present invention.

[0069] In one embodiment, the communication optimization method of the flexible device is applicable to a computer system and also to a server connected to the flexible device for communication. By optimizing the communication process and communication links of the flexible device through the computer system or the server, the communication steps of the flexible device can be simplified, thereby avoiding the situation where the flexible device responds to multiple access requests at the same time, thereby improving the processing efficiency of the flexible device in establishing communication.

[0070] Wherein, as an example, the communication optimization method of the flexible device may include:

[0071] S11, obtaining handshake timing design information of the flexible device in the power-on initialization phase, and determining fields required for communication of the flexible device from the handshake timing design information to obtain communication fields.

[0072] In one embodiment, the server may obtain handshake timing design information of the flexible device in the power-on initialization phase, and determine the fields required for the flexible device to communicate from the handshake timing design information to obtain the communication field.

[0073] The handshake timing design information may include timing design information of each process and link design of the flexible device during the communication process. Specifically, the handshake timing design information may be obtained by reading the underlying design text of the flexible device.

[0074] After obtaining the handshake timing design information, the text in the handshake timing design information can be identified, and the fields of each link of the communication can be extracted from the text, including the fields of the key links such as the handshake request, response confirmation, and parameter configuration of the flexible device, to obtain the communication field. The communication field can be read later and modified according to the communication field. The various communication links and the order of processing can be modified to achieve the purpose of communication optimization.

[0075] Wherein, as an example, the obtaining of the handshake timing design information of the flexible device in the power-on initialization phase, and determining the fields required for the flexible device communication from the handshake timing design information to obtain the communication field may include the following sub-steps:

[0076] S111 , after the flexible device is powered on and initialization phase is completed and handshake timing design information of the flexible device is obtained, modeling and analysis are performed on the handshake timing design information according to a communication process of the flexible device to obtain a timing field.

[0077] S112 , performing address increment scanning on the timing field according to the device address allocation table of the flexible device to obtain a device identifier and physical address information of the flexible device.

[0078] S113: Acquire the real-time status of the device identifier flexible device, and if the status field corresponding to the real-time status conflicts with the field of the physical address information, reallocate the physical address information.

[0079] S114. If the status field corresponding to the real-time status does not conflict with the field of the physical address information, the field of the physical address information is recorded to obtain a communication field.

[0080] In one embodiment, handshake timing design information of the power-on initialization phase of the flexible device can be obtained, and the handshake timing design information can include timing information of processes such as handshake request, response confirmation, and parameter configuration. Then, a timing diagram analysis method is used to model and analyze the timing of processes such as handshake request, response confirmation, and parameter configuration, and a timing field can be obtained.

[0081] The modeling analysis may specifically be to perform communication modeling according to the handshake timing design information, and then read various parameters and fields of the communication after modeling to obtain the timing field.

[0082] Next, the address of the timing field can be scanned incrementally according to the device address allocation table of the flexible device to obtain the device identifier and physical address information of the flexible device. Exemplarily, the address of the timing field of the flexible device is scanned incrementally according to the device address allocation table, and the device identifier and physical address information are obtained from the starting address in the timing field in a decimal increment manner.

[0083] The real-time status of the flexible device with device identifier is obtained, and the real-time status is the operation status of the port of the flexible device during communication, including communication abnormality, interruption, unrecognizable address, overload, etc. It can be determined whether the address connected to the operation status of the port is the same as or matches the physical address information.

[0084] If the address connected to the operating status of its port is different from or does not match the physical address information, it means that the status field corresponding to the real-time status conflicts with the field of the physical address information, which means that the port of the flexible device cannot allocate the physical address information of each communication link. Therefore, it is necessary to reallocate the physical address information, or modify the communication address that can be set for its port to the physical address information.

[0085] On the contrary, if the address connected to the operating status of the port is the same as or matches the physical address information, it is determined that the status field corresponding to the real-time status does not conflict with the field of the physical address information, and the field of the physical address information can be recorded to obtain the communication field.

[0086] By recording the fields of physical address information, we can obtain the addresses at which each port of the flexible device can establish a connection during communication and the fields corresponding to each parameter of the address. Subsequently, we can optimize according to each communication field. For example, we can allow more interfaces to communicate, or allow more interfaces to process requests with different timings, thereby achieving the purpose of optimization.

[0087] In addition to comparing fields for conflict, the address check value of the device port can also be calculated through a double-byte cyclic redundancy check to determine whether the address check value of the port is the same as the check value of the physical address information to determine whether modification is required.

[0088] S12: Screen and process the communication fields based on the communication process and communication protocol of the flexible device to obtain necessary fields of the communication process.

[0089] In one embodiment, the communication fields can be screened and processed based on the communication process and communication protocol of the flexible device to obtain the necessary fields of the communication process. The communication process can be the original communication process of the flexible device, and the communication protocol can also be the original communication protocol of the flexible device. If the user believes that the original communication process and communication protocol are insufficient, they can also be modified, and then the communication fields can be screened and processed according to the new communication process and communication protocol to obtain the necessary fields of the communication process.

[0090] For example, by modifying the number of ports and the order of communications, the user can filter and process the communication fields according to the new communication process to obtain the necessary fields of the communication process.

[0091] Among them, the necessary fields may include: the start bit, control bit, data bit and check bit of the handshake communication protocol; the configuration parameters established by the device in response to the handshake request: DC voltage, current limit, load power and other configuration parameters.

[0092] In an optional embodiment, the filtering and processing of the communication fields based on the communication process and communication protocol of the flexible device to obtain the necessary fields of the communication process may include the following sub-steps:

[0093] S121, reading the message corresponding to the communication process and the communication protocol of the flexible device to obtain the device identification field.

[0094] S122: Perform Huffman coding compression processing on the device identification field to obtain a compressed field.

[0095] S123: extracting the identification bit of the device communication from the compressed field, and filtering the corresponding field from the communication field according to the identification bit to obtain the necessary fields of the communication process.

[0096] In one embodiment, if the user has not modified the communication process and communication protocol of the flexible device, the original communication process and communication protocol of the flexible device are used. If there is a modification, the message of the new communication process and communication protocol of the flexible device can be obtained, and then the message of the communication process and communication protocol of the flexible device can be read to obtain the corresponding field and obtain the device identification field.

[0097] In one embodiment, the device identification field may include an eight-bit binary bitmap to mark the timestamp position and the device status bit. For the device identification field, Huffman coding compression processing may be performed to obtain a compressed field; thus, the corresponding field may be filtered from the communication field according to the identification bit to obtain the necessary fields of the communication process.

[0098] Among them, the identification bit can be the starting position of a key field. For example, the first flag bit marks the starting position of the device type field, the second flag bit marks the starting position of the handshake connection field, and the third flag bit marks the starting position of the communication timestamp field between the two.

[0099] By analyzing the communication process and communication protocol of flexible devices, redundant steps and unnecessary waiting are identified, and only necessary fields are extracted. Subsequently, the process and field structure can be simplified, non-core fields can be reduced, and subsequent communication can be facilitated to achieve the effect of communication optimization.

[0100] S13. After constructing the communication thread of the flexible device based on the necessary fields, the communication thread is used to perform communication simulation and obtain parameters of the simulation process to obtain simulation parameters. The communication thread includes the thread of the flexible device in the handshake request phase and the thread of the flexible device in the parameter configuration phase.

[0101] In one embodiment, after obtaining the necessary fields, a communication thread of the flexible device can be constructed based on the necessary fields. The communication thread is a step flow for the flexible device to perform communication processing. Then, the communication thread can be used to perform communication simulation and obtain parameters of the simulation process to obtain simulation parameters. The communication thread includes the thread of the flexible device in the handshake request phase and the thread of the flexible device in the parameter configuration phase.

[0102] Through simulation parameters, it is determined whether there is a problem with the communication process, for example, whether there is a communication interruption, communication anomaly, or abnormal voltage and current parameters during the communication process. Because when extracting necessary fields, some fields may be omitted, making the communication impossible to complete, resulting in communication anomalies; similarly, some field parameters may not match the actual flexible device, causing communication anomalies and requiring modification. By simulating and obtaining simulation parameters, further modifications can be made to improve the entire simplified communication process and greatly improve the effect of communication optimization.

[0103] In one embodiment, after constructing the communication thread of the flexible device based on the necessary fields, using the communication thread to perform communication simulation and obtain parameters of the simulation process to obtain simulation parameters may include the following sub-steps:

[0104] S131. Extract fields corresponding to the handshake request phase and fields corresponding to the parameter configuration phase from the necessary fields according to the identification bit to obtain a handshake field and a configuration field.

[0105] S132: Use the handshake field and the configuration field to construct parallel threads to obtain a communication thread.

[0106] S133. After performing communication simulation based on the communication thread, obtain parameters of the simulation process according to a preset parameter mapping table to obtain simulation parameters.

[0107] In one embodiment, in order to simplify the processing flow, the handshake request and parameter configuration links of the flexible device can be processed in parallel, and a parallel processing mechanism can be adopted. After extracting the fields corresponding to the handshake request phase and the fields corresponding to the parameter configuration phase from the necessary fields according to the identification bit, and obtaining the handshake field and the configuration field, the handshake field and the configuration field can be used to construct a parallel thread to obtain a communication thread. Among them, the identification bit can be a thread identifier generated by string hash calculation based on the identifier of the flexible device.

[0108] At the same time, a shared memory area can be used to divide a handshake data area and a configuration data area, wherein the handshake data area is used to receive and store device response data, and the configuration data area is used to receive and store device configuration data.

[0109] Next, the communication thread can be executed to perform communication simulation, and the parameters of the simulation process can be obtained according to the preset parameter mapping table to obtain simulation parameters. The preset parameter mapping table can be a table preset by the user, which contains various indicator parameters for determining whether the communication is abnormal.

[0110] Then determine whether the simulation parameters are within the numerical range of the indicator parameters. If so, it is normal. If not, it is determined to be abnormal and needs to be adjusted.

[0111] Acquire a thread identification number according to the flexible device identifier, allocate a handshake request thread and a parameter configuration thread according to the thread identification number, set a real-time priority for the handshake request thread, and set a normal priority for the parameter configuration thread;

[0112] For example, the simulation parameters include parameters of the voltage and current of the flexible device, such as overvoltage threshold, undervoltage threshold, rated voltage value, overcurrent threshold, rated current value, etc., and each value is judged whether it is within the corresponding index parameter range. If each parameter is within the index parameter range, it is normal. Otherwise, if one or more are not within the index parameter range, it is abnormal.

[0113] For another example, the simulation parameters include the number of bytes in communication. If the number of bytes is within the indicator parameter range, it is normal; otherwise, it is abnormal.

[0114] For another example, the simulation parameters include the interval duration between the heartbeat packets sent by both parties during the handshake period. If the interval duration is within the indicator parameter range, it is normal; otherwise, it is abnormal.

[0115] S14. If the value of the simulation parameter does not satisfy the preset value range, the communication thread is adaptively adjusted according to the network status of the flexible device to obtain communication optimization information of the flexible device, so as to optimize the flexible device using the communication optimization information.

[0116] In one embodiment, if the value of the simulation parameter does not meet the preset value range, it means that there is a problem with the communication simulated according to the necessary field, and there may be a communication abnormality or communication failure. In order to ensure that the communication can be executed, the communication thread can be adaptively adjusted according to the network status of the flexible device to obtain the communication optimization information of the flexible device, so as to optimize the flexible device using the communication optimization information.

[0117] Specifically, the network status of the flexible device can be obtained. The network status can be the communication network status of the flexible device during the simulation process, including abnormal status and failed status. At the same time, the parameters corresponding to each network status can be obtained, and then the areas that need to be modified and the deficiencies in the communication process can be determined based on the parameters.

[0118] Wherein, as an example, the adaptively adjusting the communication thread according to the network status of the flexible device to obtain the communication optimization information of the flexible device, and optimizing the flexible device by using the communication optimization information, may include the following sub-steps:

[0119] S141. Determine the network status of the flexible device, and generate a corresponding description field according to the network status.

[0120] S142. Match corresponding performance indicator values ​​in a preset data table according to the description field.

[0121] S143: Adaptively adjust the value of the communication thread according to the performance indicator value to obtain communication optimization information of the flexible device, and optimize the flexible device using the communication optimization information.

[0122] In one embodiment, different optimizations can be performed dynamically according to different network conditions of the flexible device. For example, the handshake steps can be simplified when the network condition is poor, and the handshake timing data in each scenario can be continuously collected to form an optimization knowledge base, and a verified solution can be used for similar scenarios to find the corresponding performance indicator value, and then adaptively adjusted according to the performance indicator value to achieve optimization.

[0123] Specifically, a corresponding description field may be generated according to the network status, where the description field is a field of text corresponding to the network status, for example, handshake abnormality or request sending failure.

[0124] Next, the corresponding performance indicator value can be matched in the preset data table according to the description field, wherein the preset data table is a data table constructed by the user after pre-collecting data of various network conditions and recording it in the database. The data table includes different network conditions, as well as the best solutions for different network conditions and various parameters in the solutions, i.e., performance indicator values.

[0125] Therefore, the corresponding performance index value can be matched in the preset data table according to the description field. Finally, the value of the communication thread is adaptively adjusted according to the performance index value to obtain the communication optimization information of the flexible device, so as to optimize the flexible device using the communication optimization information.

[0126] Among them, adaptive adjustment can be to modulate the parameters of the original scheme to the performance index value. If the original scheme has an index with the same performance index value, but the values ​​of both parties are different, the corresponding value can be replaced with the performance index value; if the original scheme does not have an index with the same performance index value, the performance index value is added to complete the first modification; in addition, if the original scheme has another different index, if communication still fails or is abnormal after adding the performance index value, it can be deleted.

[0127] In another optional embodiment, the network status of the flexible device may also be displayed to the user, and the user may view and then enter the corresponding description field, so that the corresponding performance indicator value may be matched in a preset data table according to the description field for subsequent operations.

[0128] In one embodiment, after the flexible device is optimized using the communication optimization information, the flexible device may need to establish communication with another device or server to perform different tasks while performing business tasks during actual operation. In order to facilitate the adjustment of the priority of the flexible device in processing different requirements and avoid affecting its actual operation due to other communication requests, as an example, after the step of optimizing the flexible device using the communication optimization information, the method further includes:

[0129] S21. Construct a priority value table and a communication priority value about task priorities according to the service type of the flexible device, and transmit the priority value table and the communication priority value to the flexible device for comparison by the flexible device.

[0130] S22. When receiving a forwarding task from a flexible device, perform task processing according to the forwarding task, wherein the forwarding task is a task in which the flexible device determines that the communication priority value is greater than a value in the priority value table.

[0131] The user can predetermine the tasks that the flexible device can perform, and assign a task priority to each task, and then build a priority value table based on the task priority values ​​of the tasks that the flexible device can perform. At the same time, the communication priority of this task can be set to obtain the communication priority value.

[0132] The priority value table and the communication priority value are sent to the flexible device. When the flexible device receives a handshake request sent by other devices during the execution of a task, the communication priority value corresponding to the handshake request can be compared with the task priority value of its current task. If the communication priority value is greater than the value in the priority value table, it means that the handshake communication needs to be performed first, and then the current task is performed. In order not to delay the current task and avoid other communication requests affecting its actual operation, the flexible device can send the current task to the server, so that the server can get the forwarded task, so that the server can perform the task on behalf of the flexible device, and send its task result to the flexible device after the task is completed.

[0133] In addition, the flexible device can also generate an asynchronous task identifier based on the sequence number and timestamp in the device handshake request message, and assign parameter configuration tasks and data preloading tasks to the time slice round-robin scheduling queue through the asynchronous task identifier, and then execute the task later.

[0134] In order to store the current task conveniently, the cache area can also be divided into two front and rear buffers, one for storing communication requests and the other for storing the data of the current task.

[0135] In one embodiment, after the flexible device is optimized using the communication optimization information, the flexible device needs to communicate with multiple external devices. In order to facilitate the storage of data in the common processes of different external devices, as an example, after the step of optimizing the flexible device using the communication optimization information, the method further includes:

[0136] S31, determining the communication bandwidth of the flexible device, and establishing a multi-level cache according to the size of the communication bandwidth to store communication handshake requests of different external devices.

[0137] The communication bandwidth between the flexible device and the server can be determined, and then multi-level caches can be established on the flexible device and the server respectively to store relevant information of handshake requests, response confirmations and parameter configurations.

[0138] If the flexible device caches the information of the most recent successful handshake, it will use the cache to initiate a handshake request first. The server caches the handshake information of each flexible device, responds to repeated requests first, and sets a validity period for the cached handshake information and updates it regularly.

[0139] Specifically, a three-level cache structure can be established, which includes a register cache for storing handshake requests, a memory cache for storing response messages, and an external memory cache for storing configuration information; four hash feature values ​​are calculated through the handshake request, and corresponding position values ​​are queried in the bitmap for the hash feature values. If the number of repetitions indicated by the position value exceeds a preset threshold, a cache response is obtained from the three-level cache; for the data in the three-level cache, the data retention time is calculated through a clock reference, and if the data retention time exceeds a preset time, a cleanup mark is added to a bidirectional linked list; an eight-bit read-write lock is used to obtain access rights to the three-level cache. If a cleanup mark is obtained, the lock is released and data is migrated between the three-level caches according to the hit counter value.

[0140] In this embodiment, the embodiment of the present invention provides a communication optimization method for a flexible device, and its beneficial effect is that: the present invention can obtain the handshake timing design information of the flexible device in the power-on initialization stage, determine the necessary fields of the communication process from the handshake timing design information; construct the communication optimization information of the flexible device based on the necessary fields, and use the communication optimization information to optimize the flexible device. By combining the handshake timing design information of the entire communication link and process to construct the communication optimization information, the communication process can be optimized to simplify the communication steps, to avoid the situation where the communication burden is increased due to the flexible device responding to multiple access requests at the same time, to reduce the amount of communication data, shorten the communication time between devices, and improve communication efficiency.

[0141] The embodiment of the present invention also provides a communication optimization device for a flexible device, see Figure 2 , showing a schematic structural diagram of a communication optimization device for a flexible device provided in one embodiment of the present invention.

[0142] Wherein, as an example, the communication optimization device of the flexible device may include:

[0143] A field determination module 210 is used to obtain handshake timing design information of the flexible device in the power-on initialization phase, and determine the fields required for the flexible device communication from the handshake timing design information to obtain a communication field;

[0144] A field screening module 220 is used to screen and process the communication fields based on the communication process and communication protocol of the flexible device to obtain necessary fields of the communication process;

[0145] A parameter acquisition module 230 is used to construct a communication thread of the flexible device based on the necessary fields, perform communication simulation using the communication thread and obtain parameters of the simulation process to obtain simulation parameters, wherein the communication thread includes a thread of the flexible device in the handshake request phase and a thread of the flexible device in the parameter configuration phase;

[0146] The optimization module 240 is used to adaptively adjust the communication thread according to the network status of the flexible device if the value of the simulation parameter does not meet the preset value range, obtain communication optimization information of the flexible device, and optimize the flexible device using the communication optimization information.

[0147] Optionally, the acquiring handshake timing design information of the flexible device in the power-on initialization phase, and determining the fields required for the flexible device communication from the handshake timing design information to obtain the communication fields, includes:

[0148] After obtaining handshake timing design information of the flexible device during the power-on initialization phase of the flexible device, modeling and analyzing the handshake timing design information according to the communication process of the flexible device to obtain a timing field;

[0149] Performing address increment scanning on the timing field according to the device address allocation table of the flexible device to obtain the device identifier and physical address information of the flexible device;

[0150] Acquire the real-time status of the device identifier flexible device, and if the status field corresponding to the real-time status conflicts with the field of the physical address information, reallocate the physical address information;

[0151] If the status field corresponding to the real-time status conflicts with the field of the physical address information, the field of the physical address information is recorded to obtain the communication field.

[0152] Optionally, the communication fields are screened and processed based on the communication process and communication protocol of the flexible device to obtain necessary fields of the communication process, including:

[0153] Read the message corresponding to the communication process and communication protocol of the flexible device to obtain the device identification field;

[0154] Performing Huffman coding compression processing on the device identification field to obtain a compressed field;

[0155] The identification bit of the device communication is extracted from the compressed field, and the corresponding field is filtered from the communication field according to the identification bit to obtain the necessary fields of the communication process.

[0156] Optionally, after constructing the communication thread of the flexible device based on the necessary fields, using the communication thread to perform communication simulation and obtaining parameters of the simulation process to obtain simulation parameters includes:

[0157] Extracting the fields corresponding to the handshake request phase and the fields corresponding to the parameter configuration phase from the necessary fields according to the identification bit, to obtain the handshake field and the configuration field;

[0158] The handshake field and the configuration field are used to construct parallel threads to obtain communication threads;

[0159] After communication simulation is performed based on the communication thread, parameters of the simulation process are acquired according to a preset parameter mapping table to obtain simulation parameters.

[0160] Optionally, the adaptively adjusting the communication thread according to the network status of the flexible device to obtain communication optimization information of the flexible device, and optimizing the flexible device using the communication optimization information, includes:

[0161] Determine the network status of the flexible device, and generate a corresponding description field according to the network status;

[0162] Matching the corresponding performance indicator value in a preset data table according to the description field;

[0163] The numerical value of the communication thread is adaptively adjusted according to the performance indicator value to obtain communication optimization information of the flexible device, so as to optimize the flexible device using the communication optimization information.

[0164] Optionally, the device further comprises:

[0165] a transmission priority module, configured to construct a priority value table for task priorities and a communication priority value according to a service type of the flexible device after the step of optimizing the flexible device by using the communication optimization information, and transmit the priority value table and the communication priority value to the flexible device for comparison by the flexible device;

[0166] The task processing module is used to perform task processing according to the forwarding task when receiving a forwarding task from the flexible device, wherein the forwarding task is a task in which the flexible device determines that the communication priority value is greater than the value in the priority value table.

[0167] Optionally, the device further comprises:

[0168] A cache module is established to determine the communication bandwidth of the flexible device after the step of optimizing the flexible device using the communication optimization information, and to establish a multi-level cache according to the size of the communication bandwidth to store communication handshake requests of different external devices.

[0169] Those skilled in the art can clearly understand that, for the sake of convenience and brevity of description, the specific working process of the device described above can refer to the corresponding process in the aforementioned method embodiment, and will not be repeated here.

[0170] Furthermore, an embodiment of the present application also provides an electronic device, including: a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein when the processor executes the program, the communication optimization method for the flexible device as described in the above embodiment is implemented.

[0171] Furthermore, an embodiment of the present application also provides a computer-readable storage medium, wherein the computer-readable storage medium stores a computer-executable program, and the computer-executable program is used to enable a computer to execute the communication optimization method for a flexible device as described in the above embodiment.

[0172] It should be noted that the orientation or positional relationship indicated by the terms "upper", "lower", etc. is based on the orientation or positional relationship shown in the accompanying drawings, which is only for the convenience of describing the embodiments of the present invention and simplifying the description, rather than indicating or implying that the device or element referred to must have a specific orientation, be constructed and operated in a specific orientation, and therefore cannot be understood as a limitation of the present invention. When an element such as a layer, region or substrate is referred to as being "on" or "above" another element, it can be directly on the other element, or there can also be an intermediate element. On the contrary, when an element is referred to as "directly on" or "above" another element, there is no intermediate element. It should also be understood that when an element is referred to as being "under" or "below" another element, it can be directly under or below the other element, or there can also be an intermediate element. On the contrary, when an element is referred to as being "directly under" or "below" another element, there is no intermediate element. Unless otherwise clearly specified and limited, the terms "installed", "connected" and "connected" should be understood in a broad sense, for example, it can be a fixed connection, a detachable connection, or an integral connection; it can be a mechanical connection or an electrical connection; it can be a direct connection or an indirect connection through an intermediate medium, or it can be the internal communication of two components. For ordinary technicians in this field, the specific meanings of the above terms in the present invention can be understood according to specific circumstances.

[0173] Those skilled in the art will appreciate that the embodiments of the present application may also provide computer program products. Therefore, the present application may adopt the form of complete hardware embodiments, complete software embodiments, or embodiments in combination with software and hardware. Moreover, the present application may adopt the form of computer program products implemented on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) that contain computer-usable program codes.

[0174] The present application is described with reference to the flowcharts and / or block diagrams of the methods, devices (systems), apparatuses, and computer program products according to the embodiments of the present application. It should be understood that each process and / or block in the flowchart and / or block diagram, as well as the combination of the processes and / or blocks in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device to generate a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the processes in the flowchart and / or block diagram. Figure 1 A process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.

[0175] These computer program instructions may also be stored in a computer-readable memory capable of directing a computer or other programmable data processing device to operate in a specific manner, so that the instructions stored in the computer-readable memory produce an article of manufacture comprising an instruction device, which implements the process Figure 1 A process or multiple processes and / or boxes Figure 1 A function specified in one or more boxes.

[0176] These computer program instructions can also be loaded onto a computer or other programmable data processing device so that a series of operating steps are executed on the computer or other programmable device to produce a computer-implemented process, thereby providing instructions for implementing the process. Figure 1 A process or multiple processes and / or boxes Figure 1 The steps for the functions specified in one or more boxes.

[0177] The above is only a preferred embodiment of the present invention. It should be pointed out that for ordinary technicians in this technical field, several improvements and modifications can be made without departing from the technical principles of the present invention. These improvements and modifications should also be regarded as the scope of protection of the present invention.

Claims

1. A communication optimization method for a flexible device, characterized in that: The method comprises: Acquire handshake timing design information of the flexible device in the power-on initialization phase, and determine the fields required for the flexible device communication from the handshake timing design information to obtain the communication field; The communication fields are screened and processed based on the communication process and communication protocol of the flexible device to obtain necessary fields of the communication process; After constructing the communication thread of the flexible device based on the necessary fields, the communication thread is used to perform communication simulation and obtain parameters of the simulation process to obtain simulation parameters, wherein the communication thread includes a thread of the flexible device in the handshake request phase and a thread of the flexible device in the parameter configuration phase; If the value of the simulation parameter does not meet the preset value range, the communication thread is adaptively adjusted according to the network status of the flexible device to obtain communication optimization information of the flexible device, so as to optimize the flexible device using the communication optimization information; The adaptively adjusting the communication thread according to the network status of the flexible device to obtain the communication optimization information of the flexible device, and optimizing the flexible device by using the communication optimization information, includes: Determine the network status of the flexible device, and generate a corresponding description field according to the network status; Matching the corresponding performance indicator value in a preset data table according to the description field; The numerical value of the communication thread is adaptively adjusted according to the performance indicator value to obtain communication optimization information of the flexible device, so as to optimize the flexible device using the communication optimization information.

2. The communication optimization method for a flexible device according to claim 1, characterized in that: The step of obtaining handshake timing design information of the flexible device in the power-on initialization phase, and determining fields required for flexible device communication from the handshake timing design information to obtain communication fields includes: After the flexible device is powered on and initialization phase is completed and handshake timing design information of the flexible device is obtained, modeling and analyzing the handshake timing design information according to the communication process of the flexible device to obtain a timing field; Performing address increment scanning on the timing field according to the device address allocation table of the flexible device to obtain physical address information of the flexible device; Acquire the real-time status of the flexible device, and if the status field corresponding to the real-time status conflicts with the field of the physical address information, reallocate the physical address information; If the status field corresponding to the real-time status does not conflict with the field of the physical address information, the field of the physical address information is recorded to obtain the communication field.

3. The communication optimization method for a flexible device according to claim 1, characterized in that: The communication process and communication protocol based on the flexible device screen and process the communication fields to obtain necessary fields of the communication process, including: Read the message corresponding to the communication process and communication protocol of the flexible device to obtain the device identification field; Performing Huffman coding compression processing on the device identification field to obtain a compressed field; The identification bit of the device communication is extracted from the compressed field, and the corresponding field is filtered from the communication field according to the identification bit to obtain the necessary fields of the communication process.

4. The communication optimization method for a flexible device according to claim 3, characterized in that: After the communication thread of the flexible device is constructed based on the necessary fields, the communication thread is used to perform communication simulation and obtain parameters of the simulation process to obtain simulation parameters, including: Extracting the fields corresponding to the handshake request phase and the fields corresponding to the parameter configuration phase from the necessary fields according to the identification bit, to obtain the handshake field and the configuration field; The handshake field and the configuration field are used to construct parallel threads to obtain communication threads; After communication simulation is performed based on the communication thread, parameters of the simulation process are acquired according to a preset parameter mapping table to obtain simulation parameters.

5. The communication optimization method for a flexible device according to any one of claims 1 to 4, characterized in that: After the step of optimizing the flexible device using the communication optimization information, the method further includes: Constructing a priority value table and a communication priority value about task priorities according to the service type of the flexible device, and transmitting the priority value table and the communication priority value to the flexible device for comparison by the flexible device; When receiving a forwarding task from a flexible device, task processing is performed according to the forwarding task, wherein the forwarding task is a task in which the flexible device determines that the communication priority value is greater than a value in the priority value table.

6. The communication optimization method for a flexible device according to any one of claims 1 to 4, characterized in that: After the step of optimizing the flexible device using the communication optimization information, the method further includes: The communication bandwidth of the flexible device is determined, and a multi-level cache is established according to the size of the communication bandwidth to store communication handshake requests of different external devices.

7. A communication optimization device for a flexible device, characterized in that: The device comprises: A field determination module is used to obtain handshake timing design information of the flexible device in the power-on initialization phase, and determine the fields required for the flexible device communication from the handshake timing design information to obtain the communication field; A filter field module is used to filter and process the communication fields based on the communication process and communication protocol of the flexible device to obtain necessary fields of the communication process; A parameter acquisition module is used to construct a communication thread of the flexible device based on the necessary fields, use the communication thread to perform communication simulation and obtain parameters of the simulation process to obtain simulation parameters, wherein the communication thread includes a thread of the flexible device in the handshake request phase and a thread of the flexible device in the parameter configuration phase; an optimization module, configured to adaptively adjust the communication thread according to the network status of the flexible device if the value of the simulation parameter does not meet the preset value range, so as to obtain communication optimization information of the flexible device, and optimize the flexible device using the communication optimization information; The adaptively adjusting the communication thread according to the network status of the flexible device to obtain the communication optimization information of the flexible device, and optimizing the flexible device by using the communication optimization information, includes: Determine the network status of the flexible device, and generate a corresponding description field according to the network status; Matching the corresponding performance indicator value in a preset data table according to the description field; The numerical value of the communication thread is adaptively adjusted according to the performance indicator value to obtain communication optimization information of the flexible device, so as to optimize the flexible device using the communication optimization information.

8. An electronic device, comprising: A memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements the communication optimization method for a flexible device as described in any one of claims 1 to 6 when executing the computer program.

9. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a computer-executable program, and the computer-executable program is used to enable a computer to execute the communication optimization method for a flexible device according to any one of claims 1 to 6.

Citation Information

Patent Citations

  • Method and system for optimizing connection request in handshake process

    CN112019499A

  • Method and device for fusing serial port equipment and Android system framework

    CN117573214A